Home Assistant Community Store
GitHub API | ok
-- | --
GitHub Content | ok
GitHub Web | ok
GitHub API Calls Remaining | 5000
Installed Version | 1.33.0
Stage | running
Available Repositories | 1370
Downloaded Repositories | 10
Home Assistant Cloud
logged_in | true
-- | --
subscription_expiration | September 3, 2024 at 2:00 AM
relayer_connected | true
relayer_region | eu-central-1
remote_enabled | true
remote_connected | true
alexa_enabled | false
google_enabled | true
remote_server | eu-central-1-3.ui.nabu.casa
certificate_status | ready
can_reach_cert_server | ok
can_reach_cloud_auth | ok
can_reach_cloud | ok
Home Assistant Supervisor
host_os | Home Assistant OS 10.4
-- | --
update_channel | stable
supervisor_version | supervisor-2023.10.0
agent_version | 1.5.1
docker_version | 23.0.6
disk_total | 228.5 GB
disk_used | 146.0 GB
healthy | true
supported | true
board | rpi4-64
supervisor_api | ok
version_api | ok
installed_addons | File editor (5.6.0), Google Assistant Webserver (0.0.4), Home Assistant Google Drive Backup (0.111.1), Mosquitto broker (6.2.1), Qbittorrent (4.5.5-4), Samba NAS (10.0.2-nas4), Studio Code Server (5.11.0), Terminal & SSH (9.7.1), VLC (0.2.0), MariaDB (2.6.1), InfluxDB (4.7.0), Paradox Alarm Interface (3.2.1), Grafana (9.0.3), Portainer (2.18.4), Advanced SSH & Web Terminal (15.0.7)
Dashboards
dashboards | 6
-- | --
resources | 2
views | 5
mode | storage
Recorder
oldest_recorder_run | October 10, 2023 at 10:40 AM
-- | --
current_recorder_run | October 11, 2023 at 10:07 PM
estimated_db_size | 936.55 MiB
database_engine | mysql
database_version | 10.6.12
Sonoff
version | 3.5.2 (2ad1cd7)
-- | --
cloud_online | 7 / 9
local_online | 7 / 7
Xiaomi Miot Auto
component_version | 0.7.13
-- | --
can_reach_server | ok
can_reach_spec | ok
logged_accounts | 1
total_devices | 5
Checklist
[X] I have read the FAQ to see if there is a known solution to my problem.
[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..
Describe the issue
Hi!
I have a problem with Energy dashboard and Powercalc entities. When entering the Energy dashboard after a Home Assistant restart, I see that a lot of Powercalc entites have an error "Unexpected device class". As I see in the Developer tools, the Device class attribute is missing for these entities. After a while, when the device is in use, and the Energy is changing, it's getting fixed, and the Device class attribute is added.
Could you add the "Device class: energy" attribute immediately after restart to the Powercalc entities, instead of only after change?
Thank you!
Regards,
Krisztián
Reproduction steps
Restart Home Assistant
Opening the Dashboard/Energy for edit
Check the error messages, PowerCalc entities for unused devices should be there with "Unexpected device class" error
...
Debug logs
2023-10-11 22:08:02.702 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.backyard_poolconnector: Entity is manually configured, skipping auto configuration
2023-10-11 22:08:04.670 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] No existing energy sensor found for the power sensor 'sensor.backyard_poolconnector_power'
2023-10-11 22:08:04.671 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: PoolConnector energy
2023-10-11 22:08:04.671 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: PoolConnector energy daily (entity_id=sensor.backyard_poolconnector_energy_daily)
2023-10-11 22:08:04.671 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: PoolConnector energy monthly (entity_id=sensor.backyard_poolconnector_energy_monthly)
2023-10-11 22:08:04.672 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: PoolConnector energy yearly (entity_id=sensor.backyard_poolconnector_energy_yearly)
2023-10-11 22:08:04.726 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.backyard_poolconnector_energy to device e602668b62c0da6af6a9fedad70ba3eb
2023-10-11 22:08:04.728 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.backyard_poolconnector_energy_daily to device e602668b62c0da6af6a9fedad70ba3eb
2023-10-11 22:08:04.731 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.backyard_poolconnector_energy_monthly to device e602668b62c0da6af6a9fedad70ba3eb
2023-10-11 22:08:04.735 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.backyard_poolconnector_energy_yearly to device e602668b62c0da6af6a9fedad70ba3eb
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.33.0 Stage | running Available Repositories | 1370 Downloaded Repositories | 10Home Assistant Cloud
logged_in | true -- | -- subscription_expiration | September 3, 2024 at 2:00 AM relayer_connected | true relayer_region | eu-central-1 remote_enabled | true remote_connected | true alexa_enabled | false google_enabled | true remote_server | eu-central-1-3.ui.nabu.casa certificate_status | ready can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 10.4 -- | -- update_channel | stable supervisor_version | supervisor-2023.10.0 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 228.5 GB disk_used | 146.0 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | File editor (5.6.0), Google Assistant Webserver (0.0.4), Home Assistant Google Drive Backup (0.111.1), Mosquitto broker (6.2.1), Qbittorrent (4.5.5-4), Samba NAS (10.0.2-nas4), Studio Code Server (5.11.0), Terminal & SSH (9.7.1), VLC (0.2.0), MariaDB (2.6.1), InfluxDB (4.7.0), Paradox Alarm Interface (3.2.1), Grafana (9.0.3), Portainer (2.18.4), Advanced SSH & Web Terminal (15.0.7)Dashboards
dashboards | 6 -- | -- resources | 2 views | 5 mode | storageRecorder
oldest_recorder_run | October 10, 2023 at 10:40 AM -- | -- current_recorder_run | October 11, 2023 at 10:07 PM estimated_db_size | 936.55 MiB database_engine | mysql database_version | 10.6.12Sonoff
version | 3.5.2 (2ad1cd7) -- | -- cloud_online | 7 / 9 local_online | 7 / 7Xiaomi Miot Auto
component_version | 0.7.13 -- | -- can_reach_server | ok can_reach_spec | ok logged_accounts | 1 total_devices | 5Checklist
Describe the issue
Hi! I have a problem with Energy dashboard and Powercalc entities. When entering the Energy dashboard after a Home Assistant restart, I see that a lot of Powercalc entites have an error "Unexpected device class". As I see in the Developer tools, the Device class attribute is missing for these entities. After a while, when the device is in use, and the Energy is changing, it's getting fixed, and the Device class attribute is added.
Could you add the "Device class: energy" attribute immediately after restart to the Powercalc entities, instead of only after change?
Thank you! Regards, Krisztián
Reproduction steps
Debug logs
Diagnostics dump or YAML config
powercalc: force_update_frequency: 00:01:00 energy_integration_method: left ignore_unavailable_state: true create_utility_meters: true create_energy_sensors: false energy_sensor_precision: 2 utility_meter_types: