bramstroker / homeassistant-powercalc

Custom component to calculate estimated power consumption of lights and other appliances
MIT License
961 stars 252 forks source link

when creating group in gui memberlist not populated #1359

Closed morris2009 closed 1 year ago

morris2009 commented 1 year ago

Hi, when I create (or edit) a powercalc group from the gui, the list 'member powercalc sensors' is not populated when I want to add a second sensor to the group. The list is only sometimes populated the first time. So creating a group with more then 1 member isn't possible.

home assistant version 2022.12.1 Browsers tried: Google Chrome. Safari

Abbadon89 commented 1 year ago

+1,
Newest integration, HA 22.12.05 firefox, edge,

bramstroker commented 1 year ago

Thanks for reporting, will have a look this weekend.

bramstroker commented 1 year ago

Could you please download diagnostics of the config entry causing the problems? You can do so by clicking the 3 dots.

Abbadon89 commented 1 year ago

I was able to add group_member_sensors only when i was adding new device. by config it was not possible

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2022.12.5", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.10.7", "docker": true, "arch": "x86_64", "timezone": "Europe/Warsaw", "os_name": "Linux", "os_version": "5.15.80", "supervisor": "2022.11.2", "host_os": "Home Assistant OS 9.4", "docker_version": "20.10.19", "chassis": "embedded", "run_as_root": true }, "custom_components": { "powercalc": { "version": "v1.1.6", "requirements": [ "numpy>=1.21.1" ] }, "philips_ambilight_hue": { "version": "1.0.1", "requirements": [ "ha-philipsjs==2.7.6" ] }, "blitzortung": { "version": "1.0.1", "requirements": [ "paho-mqtt>=1.5.0" ] }, "gree_ext": { "version": "0.1.0", "requirements": [] }, "hacs": { "version": "1.28.4", "requirements": [ "aiogithubapi>=22.2.4" ] }, "bodymiscale": { "version": "3.0.4", "requirements": [ "cachetools==5.1.0" ] }, "antistorm": { "version": "v1.0.4", "requirements": [ "requests" ] }, "eventsensor": { "version": "3.0.0", "requirements": [] }, "localtuya": { "version": "4.1.1", "requirements": [] }, "xiaomi_cloud_map_extractor": { "version": "v2.2.0", "requirements": [ "pillow", "pybase64", "python-miio", "requests", "pycryptodome" ] }, "ssh": { "version": "0.1.5", "requirements": [ "pexpect==4.6.0" ] }, "uptime_kuma": { "version": "2.0.2", "requirements": [ "pyuptimekuma==0.0.6" ] }, "programmable_thermostat": { "version": "8.1", "requirements": [] }, "nodered": { "version": "1.1.2", "requirements": [] }, "sleep_as_android": { "version": "1.10.0", "requirements": [ "pyhaversion" ] }, "scheduler": { "version": "v0.0.0", "requirements": [] }, "burze_dzis_net": { "version": "v1.0.4", "requirements": [ "zeep" ] } }, "integration_manifest": { "after_dependencies": [ "integration", "utility_meter" ], "codeowners": [ "@bramstroker" ], "config_flow": true, "dependencies": [ "light", "group", "template", "select", "utility_meter" ], "documentation": "https://github.com/bramstroker/homeassistant-powercalc", "domain": "powercalc", "iot_class": "local_polling", "issue_tracker": "https://github.com/bramstroker/homeassistant-powercalc/issues", "name": "Powercalc", "requirements": [ "numpy>=1.21.1" ], "version": "v1.1.6", "is_built_in": false }, "data": { "entry": { "entry_id": "ce4b946759813a2667cc06a39f337a29", "version": 1, "domain": "powercalc", "title": "swiatla_powercalc", "data": { "name": "swiatla_powercalc", "create_utility_meters": true, "hide_members": true, "unique_id": "swiatla_powercalc", "group_member_sensors": [ "f9d789e8cbe3e290308cb6738ade011e", "b8535da326a68dc368753a0eaae2076c", "4836f3c6f74ca51b4cd6fa343d227a79", "122e0664ac7a67700b0397b5e59ab27b", "414425f68416178aef24b3e3b03eb622", "805df059ff18a4f65c8549364b74e492" ], "sensor_type": "group", "group_power_entities": [ "sensor.zarowka_ikea_biurko_power", "sensor.zarowka_ikea_blat_lewa_power", "sensor.zarowka_ikea_blat_prawa_power", "sensor.zarowka_ikea_dzieciecy_chmurka_power", "sensor.zarowka_ikea_dzieciecy_lampa_power", "sensor.zarowka_ikea_garderoba_power", "sensor.zarowka_ikea_lozko_agata_power", "sensor.zarowka_ikea_lozko_michal_power", "sensor.zarowka_ikea_salon_1_power", "sensor.zarowka_ikea_salon_2_power", "sensor.zarowka_ikea_salon_3_power", "sensor.ikea_dzieciecy_sloneczko_1_power", "sensor.ikea_dzieciecy_sloneczko_2_power", "sensor.zarowka_ikea_salon_lampa_power" ], "group_energy_entities": [ "sensor.ikea_dzieciecy_sloneczko_1_energy", "sensor.ikea_dzieciecy_sloneczko_2_energy", "sensor.zarowka_ikea_biurko_energy", "sensor.zarowka_ikea_blat_lewa_energy", "sensor.zarowka_ikea_blat_prawa_energy", "sensor.zarowka_ikea_dzieciecy_chmurka_energy", "sensor.zarowka_ikea_dzieciecy_lampa_energy", "sensor.zarowka_ikea_garderoba_energy", "sensor.zarowka_ikea_lozko_agata_energy", "sensor.zarowka_ikea_lozko_michal_energy", "sensor.zarowka_ikea_salon_1_energy", "sensor.zarowka_ikea_salon_2_energy", "sensor.zarowka_ikea_salon_3_energy", "sensor.zarowka_ikea_salon_lampa_energy" ] }, "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": false, "source": "user", "unique_id": "swiatla_powercalc", "disabled_by": null } } }

ShayGus commented 1 year ago

+1 on this bug

bramstroker commented 1 year ago

Bug confirmed btw, I am able to reproduce. Will be fixed when I find some more time in upcoming days.

bramstroker commented 1 year ago

Seem to be some regression in HA 2022.12.x I only hit this bug after updating HA from 2022.11.4 to latest 2022.12 version. Similar issue report on HA issue tracker. https://github.com/home-assistant/core/issues/83566

bramstroker commented 1 year ago

There are more issues to be found in HA issue trackers. seem to be a frontend bug and also affects the tariff selection in utility meter helper core component. For example https://github.com/home-assistant/frontend/issues/14703 I will keep an eye on this issues and keep you updated when it is fixed.

Not something I can fix in powercalc.

bramstroker commented 1 year ago

There was a new frontend release which should contain a fix. https://github.com/home-assistant/frontend/releases/tag/20221228.0 The next release of HA core should contain this frontend version which should probably fix the issue. Fingers crossed.

bramstroker commented 1 year ago

I have just installed latest beta 2023.1.0b1 and can confirm the issue is fixed. So it will be fixed when 2023.1.0 hits the road.

bramstroker commented 1 year ago

Is fixed in HA 2023.1 Closing this issue.

WMP commented 6 months ago

I thinks i have this same issue, but on: Core 2024.2.5 Powercalc 1.10.8 and 1.11.0

I have 2 real metters on smart sockets, and i cannot show it in "Member powercalc sensors". I can found this smart sockets sensors in "Additional power entities".