bramstroker / homeassistant-powercalc

Custom component to calculate estimated power consumption of lights and other appliances
MIT License
1.01k stars 261 forks source link

multi switch issue #2612

Open Ulukai0 opened 1 week ago

Ulukai0 commented 1 week ago

System Health details

System Information

version core-2024.10.3
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.54-haos
arch aarch64
timezone Europe/Paris
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 | 1449 Downloaded Repositories | 19
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | 13 octobre 2025 à 02:00 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-14.ui.nabu.casa certificate_status | ready instance_id | e096044a84a24c6f96ef84f606f5d919 can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 13.2 -- | -- update_channel | stable supervisor_version | supervisor-2024.10.2 agent_version | 1.6.0 docker_version | 27.2.0 disk_total | 28.0 GB disk_used | 13.5 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 | Samba share (12.3.2), Terminal & SSH (9.15.0), ESPHome (2024.6.6), File editor (5.8.0), Network UPS Tools (0.13.2), eufy-security-ws (1.9.1), openWakeWord (1.10.0)
Dashboards dashboards | 8 -- | -- resources | 12 views | 12 mode | storage
Recorder oldest_recorder_run | 12 octobre 2024 à 07:37 -- | -- current_recorder_run | 22 octobre 2024 à 07:37 estimated_db_size | 433.05 MiB database_engine | sqlite database_version | 3.45.3

Checklist

Describe the issue

Hi, I’m triying to add a multi switch strategy to mesure the power usage of my central boiler (it has 3 Electric resistance heating), I control it with a 4 way switch (ZG-005-RF), the first switch for the on/off heating and the others for each resistances. When I try to add the multi switch, no power entities are created, but when I try to add a fixed one, it works without problem with each switch.

In configuration.yaml, when I add:

powercalc: sensors:

The power entities are created and works good, but how can i add the trigger with my on/off switch ?

Reproduction steps

1.new entry 2.virtual power (manual) 3.source entity: switch chaudiere 4.select multi_switch

  1. next
  2. switch entities: Résistance Chaudière 1,Résistance Chaudière 2,Résistance Chaudière 3
  3. power on : 1700
  4. next
  5. valider (approve ?)

...

Debug logs

2024-10-22 20:56:43.320 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.centrale_chaudiere_commutateur: Auto discovered model (manufacturer=_TZ3000_u3oupgdy, model=TS0004, model_id=None)
2024-10-22 20:56:43.320 ERROR (MainThread) [custom_components.powercalc.sensors.power] switch.centrale_chaudiere_commutateur: Skipping sensor setup: Model not found in library (manufacturer: _TZ3000_u3oupgdy, model: TS0004)
2024-10-22 20:56:43.321 ERROR (MainThread) [custom_components.powercalc.sensors.power] switch.centrale_chaudiere_commutateur: Skipping sensor setup: Model not found in library (manufacturer: _TZ3000_u3oupgdy, model: TS0004)
2024-10-22 20:56:43.321 ERROR (MainThread) [custom_components.powercalc.sensor] No energy sensor created for config_entry 01JATSDASPMAXPVKN54DXXYM4B

Diagnostics dump or YAML config

config_entry-powercalc-01JATSDASPMAXPVKN54DXXYM4B.json

bramstroker commented 1 week ago

Thanks for the report! seems I have enough information. Might be a few days until I can have a look, quite busy. But I'll check it. When I need more information I will let you know.

bramstroker commented 6 days ago

Was able to reproduce. Will be fixed with #2623. Going to release new version today.