Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected Device Class #238

Open
Sivivatu opened this issue Apr 14, 2024 · 1 comment
Open

Unexpected Device Class #238

Sivivatu opened this issue Apr 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Sivivatu
Copy link

Describe the bug
In my Energy Dashboard configuration I am getting the error:

Unexpected device class
The following entities do not have the expected device class:
sensor.foxess_pv1_sum

This means my energy dashboard is not showing any solar production.

My yaml config for the integration is below and the devices used on the energy dashboard are the integration platform sensors:

  - platform: integration
    source: sensor.foxess_pv1_power
    name: foxess_pv1_sum
    unit_time: h
    round: 2
  - platform: integration
    source: sensor.foxess_pv2_power
    name: foxess_pv2_sum
    unit_time: h
    round: 2

# Setup Daily and Realtime solar trackers that resolve the negative solar tracking
utility_meter:
  daily_pv1_sum:
    source: sensor.foxess_pv1_sum
    cycle: daily
  daily_pv2_sum:
    source: sensor.foxess_pv2_sum
    cycle: daily

# Setup Daily and real-time solar trackers that resolve the negative solar tracking
template:
  - sensor:
      - name: "Solar Power Daily"
        unit_of_measurement: "kWh"
        state: "{{ states('sensor.daily_pv1_sum') | float }}"
        # device_class: power

      - name: "Solar Power Now"
        unit_of_measurement: "kW"
        state: "{{ states('sensor.foxess_pv1_power') | float }}"
        # device_class: power

Expected behavior
The integrated sums should (and were previously) populate the solar production dashboards

Screenshots
If applicable, add screenshots to help explain your problem.
image

Debug logs:

HA version:
Core
2024.4.3
Supervisor
2024.04.0
Operating System
12.2
Frontend
20240404.2

foxess-ha version:
v0.39

@Sivivatu Sivivatu added the bug Something isn't working label Apr 14, 2024
@FozzieUK
Copy link
Collaborator

Your yaml code looks correct, and the pv1/2 sensors the integration is providing have their device_class set correctly to ‘power’.

I’m wondering if your home assistant storage has had a problem - you can check that in HA if you go to ‘Developer Tools’ and click the ‘STATISTICS’ tab, look for pv1_sum and pv2_sum in the list and is there a ‘FIX ISSUE’ highlighted, if so click it and can you post what it says.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants