homeassistant-powercalc icon indicating copy to clipboard operation
homeassistant-powercalc copied to clipboard

Entities not showing in Energy tab

Open Humphrey181 opened this issue 1 year ago • 1 comments
trafficstars

System Health details

System Information

version core-2024.9.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.4
os_name Linux
os_version 6.6.46-haos
arch aarch64
timezone Australia/Sydney
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.1
Stage running
Available Repositories 1430
Downloaded Repositories 27
Home Assistant Cloud
logged_in true
subscription_expiration October 9, 2024 at 10:00
relayer_connected true
relayer_region ap-southeast-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled true
remote_server ap-southeast-1-0.ui.nabu.casa
certificate_status ready
instance_id 2e9a21961ba34bf59fd72c897cb3fa01
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 13.1
update_channel stable
supervisor_version supervisor-2024.10.0
agent_version 1.6.0
docker_version 26.1.4
disk_total 28.0 GB
disk_used 9.9 GB
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization
board green
supervisor_api ok
version_api ok
installed_addons Matter Server (6.5.1), Advanced SSH & Web Terminal (19.0.0), Studio Code Server (5.17.1), AirCast (4.2.2), Duck DNS (1.18.0), AirSonos (4.2.2), Grafana (10.1.1), CEC Scanner (3.0), Terminal & SSH (9.15.0), Plex Media Server (3.6.0), Spotify Connect (0.13.0), Node-RED (18.1.1), File editor (5.8.0), Get HACS (1.3.1), Home Assistant Google Drive Backup (0.112.1)
Dashboards
dashboards 5
resources 8
views 24
mode storage
Recorder
oldest_recorder_run October 7, 2024 at 19:26
current_recorder_run October 9, 2024 at 04:21
estimated_db_size 501.88 MiB
database_engine sqlite
database_version 3.45.3

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

I have manually setup four power sensors. The sensors are reading power, they can be displayed in the view with real time and accumulated values, but they will not show in the Energy tab. The sensors have been setup with 0 standby power and nominal ON power only. I have tried setting these up in YAML and in the GUI. Initially, one of the sensors displayed for a few hours, but it was gone when i refreshed the following morning. I've exhausted my options.

Reproduction steps

  1. Install Powercalc

  2. Add powercalc: to configuration.yaml

  3. Manually create sensors using the GUI

  4. Sensors fail to show in the Energy tab.

  5. Initial focus is on Bathroom Heat sensor Powercalc1 Powercalc2 Powercalc3 Powercalc4

  6. What else can I do? ...

Debug logs

Full log was too big, abridged relevant lines below

2024-10-09 05:22:31.954 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=switch.bathroom_heat_1 entity_category=None, sensor_name=Bathroom Heat power strategy=fixed manufacturer= model= unique_id=pc_C9:96:48:47:7D:34_1_80)
2024-10-09 05:22:31.955 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.bathroom_heat_energy, source_entity=sensor.bathroom_heat_power, unit_prefix=k)
2024-10-09 05:22:31.956 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Bathroom Heat energy daily (entity_id=sensor.bathroom_heat_energy_daily)
2024-10-09 05:22:31.957 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Bathroom Heat energy weekly (entity_id=sensor.bathroom_heat_energy_weekly)
2024-10-09 05:22:31.958 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Bathroom Heat energy monthly (entity_id=sensor.bathroom_heat_energy_monthly)
2024-10-09 05:22:31.964 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_power to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:31.971 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_energy_daily to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:31.981 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_energy_weekly to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:31.989 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.bathroom_heat_energy_monthly to device aab6e3f3662f40e8a25353c827db19c5
2024-10-09 05:22:32.000 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.shelly1_34945470b818 entity_category=None, sensor_name=Back Deck lights power strategy=fixed manufacturer= model= unique_id=pc_509fd45a393bc566cb81a977b77d51a3)
2024-10-09 05:22:32.000 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.back_deck_lights_energy, source_entity=sensor.back_deck_lights_power, unit_prefix=k)
2024-10-09 05:22:32.001 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Back Deck lights energy daily (entity_id=sensor.back_deck_lights_energy_daily)
2024-10-09 05:22:32.002 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Back Deck lights energy weekly (entity_id=sensor.back_deck_lights_energy_weekly)
2024-10-09 05:22:32.002 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Back Deck lights energy monthly (entity_id=sensor.back_deck_lights_energy_monthly)
2024-10-09 05:22:32.007 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_power to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.013 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_energy_daily to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.022 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_energy_weekly to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.032 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.back_deck_lights_energy_monthly to device 9a9d4179dae6d22d6f06ec89f3329bab
2024-10-09 05:22:32.042 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.shelly1_349454731004 entity_category=None, sensor_name=Courtyard Lights power strategy=fixed manufacturer= model= unique_id=pc_5140108ebcef7435d15a2aa1ccf5aa65)
2024-10-09 05:22:32.043 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.courtyard_lights_energy, source_entity=sensor.courtyard_lights_power, unit_prefix=k)
2024-10-09 05:22:32.044 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Courtyard Lights energy daily (entity_id=sensor.courtyard_lights_energy_daily)
2024-10-09 05:22:32.045 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Courtyard Lights energy weekly (entity_id=sensor.courtyard_lights_energy_weekly)
2024-10-09 05:22:32.046 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Courtyard Lights energy monthly (entity_id=sensor.courtyard_lights_energy_monthly)
2024-10-09 05:22:32.049 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_power to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.056 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_energy_daily to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.065 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_energy_weekly to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.072 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.courtyard_lights_energy_monthly to device a58b0d3ee8eaac3c3257b04f2933a29c
2024-10-09 05:22:32.081 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=switch.brass_lamp_switch entity_category=None, sensor_name=Brass Lamp Switch Device Power strategy=fixed manufacturer=ikea model=TRADFRI control outlet unique_id=pc_bc:02:6e:ff:fe:fb:ca:02-1)
2024-10-09 05:22:32.081 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor (entity_id=sensor.brass_lamp_switch_device_energy, source_entity=sensor.brass_lamp_switch_device_power, unit_prefix=k)
2024-10-09 05:22:32.084 DEBUG (MainThread) [custom_components.powercalc.sensors.abstract] Binding sensor.brass_lamp_switch_device_power to device e6775f7e6999fefa40524eb8b1e5e861
2024-10-09 05:22:36.358 DEBUG (MainThread) [custom_components.powercalc.sensors.power] light.shelly1_34945470b818: State changed to "off". Power:0.00
2024-10-09 05:22:36.359 DEBUG (MainThread) [custom_components.powercalc.sensors.power] light.shelly1_349454731004: State changed to "off". Power:0.00
2024-10-09 05:22:36.425 ERROR (MainThread) [homeassistant.components.binary_sensor] rpi_power: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 724, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1302, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/rpi_power/binary_sensor.py", line 53, in update
    value = self._under_voltage.get()
            ^^^^^^^^^^^^^^^^^^^^^^^

Diagnostics dump or YAML config

No response

Humphrey181 avatar Oct 09 '24 01:10 Humphrey181

Please make sure you understand the difference between power and energy, see https://docs.powercalc.nl/troubleshooting/faq/#what-is-the-difference-between-power-and-energy.

Powercalc always creates a power sensor, and optionally an energy sensor (depending on the toggle create energy sensor). You can only add energy sensors to the energy dashboard, no power sensors. Looking at the logs you should have sensor.bathroom_heat_energy for example.

You'll have to add them to the energy dashboard in Settings -> Dashboard -> Energy under individual devices. All energy sensors created by powercalc should be selectable there.

Might be good to verify if the energy sensor actually records values by looking under Developer tools.

bramstroker avatar Oct 09 '24 16:10 bramstroker

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Nov 09 '24 01:11 github-actions[bot]