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

Auto discovery does not add new device (SONOFF ZBMINI) #1562

Closed
5 tasks done
Pantastisch opened this issue Mar 12, 2023 · 10 comments
Closed
5 tasks done

Auto discovery does not add new device (SONOFF ZBMINI) #1562

Pantastisch opened this issue Mar 12, 2023 · 10 comments
Labels
autodiscovery bug Something isn't working

Comments

@Pantastisch
Copy link
Contributor

System Health details

System Information

version core-2023.3.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 5.15.90
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.31.0
Stage running
Available Repositories 1316
Downloaded Repositories 16
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 9.5
update_channel stable
supervisor_version supervisor-2023.03.1
agent_version 1.4.1
docker_version 20.10.22
disk_total 30.8 GB
disk_used 7.3 GB
healthy true
supported failed to load: Unsupported
board ova
supervisor_api ok
version_api ok
installed_addons File editor (5.5.0), SSH & Web Terminal (13.0.3), SQLite Web (3.7.0)
Dashboards
dashboards 3
resources 0
views 5
mode storage
Recorder
oldest_recorder_run 2. März 2023 um 13:02
current_recorder_run 12. März 2023 um 19:46
estimated_db_size 967.58 MiB
database_engine sqlite
database_version 3.38.5

Checklist

  • I have read the FAQ to see if there is a known solution to my problem.
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

The recently added SONOFF ZBMINI is auto-detected, but not detected or added as new device.

Reproduction steps

  1. Update to at least v1.3.10
  2. Let SONOFF ZBMINI be in your devices
  3. Wait for system

Debug logs

2023-03-12 19:47:03.250 DEBUG (MainThread) [custom_components.powercalc.discovery] Start auto discovering entities
2023-03-12 19:47:03.250 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.waschkeller_waschmaschine: Auto discovered model (manufacturer=TP-Link, model=HS110(EU))
2023-03-12 19:47:03.254 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.waschkeller_waschmaschine: Already setup with discovery, skipping new discovery
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.waschkeller_waschmaschine_led: Auto discovered model (manufacturer=TP-Link, model=HS110(EU))
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.waschkeller_waschmaschine_led: Already setup with discovery, skipping new discovery
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.wohnzimmer_stehleuchte_hinten: Auto discovered model (manufacturer=TP-Link, model=HS110(EU))
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.wohnzimmer_stehleuchte_hinten: Already setup with discovery, skipping new discovery
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.wohnzimmer_stehleuchte_hinten_led: Auto discovered model (manufacturer=TP-Link, model=HS110(EU))
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.wohnzimmer_stehleuchte_hinten_led: Already setup with discovery, skipping new discovery
2023-03-12 19:47:03.255 DEBUG (MainThread) [custom_components.powercalc.discovery] light.wohnzimmer_stehleuchte_hinten: Entity is manually configured, skipping auto configuration
2023-03-12 19:47:03.256 DEBUG (MainThread) [custom_components.powercalc.discovery] media_player.wohnzimmer_fernseher: Cannot autodiscover model, manufacturer or model unknown from device registry
2023-03-12 19:47:03.256 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_power: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.262 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_power: Model not found in library, skipping discovery
2023-03-12 19:47:03.262 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_auto1: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.262 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_auto1: Model not found in library, skipping discovery
2023-03-12 19:47:03.262 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_auto2: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.262 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_auto2: Model not found in library, skipping discovery
2023-03-12 19:47:03.262 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_auto3: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_auto3: Model not found in library, skipping discovery
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_autohalfload: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_autohalfload: Model not found in library, skipping discovery
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_eco50: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_eco50: Model not found in library, skipping discovery
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_expresssparkle65: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_expresssparkle65: Model not found in library, skipping discovery
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_glas40: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_glas40: Model not found in library, skipping discovery
2023-03-12 19:47:03.263 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_glasscare: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_glasscare: Model not found in library, skipping discovery
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_intensiv45: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_intensiv45: Model not found in library, skipping discovery
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_intensiv70: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_intensiv70: Model not found in library, skipping discovery
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_intensivpower: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_intensivpower: Model not found in library, skipping discovery
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_kurz60: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_kurz60: Model not found in library, skipping discovery
2023-03-12 19:47:03.264 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_machinecare: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_machinecare: Model not found in library, skipping discovery
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_magicdaily: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_magicdaily: Model not found in library, skipping discovery
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_maximumcleaning: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_maximumcleaning: Model not found in library, skipping discovery
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_nightwash: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_nightwash: Model not found in library, skipping discovery
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_normal45: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_normal45: Model not found in library, skipping discovery
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_normal65: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.265 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_normal65: Model not found in library, skipping discovery
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_prerinse: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_prerinse: Model not found in library, skipping discovery
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_quick45: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_quick45: Model not found in library, skipping discovery
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_quick65: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_quick65: Model not found in library, skipping discovery
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_steamfresh: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_steamfresh: Model not found in library, skipping discovery
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_super60: Auto discovered model (manufacturer=Siemens, model=SN658X06TE)
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_spulmaschine_program_super60: Model not found in library, skipping discovery
2023-03-12 19:47:03.266 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.vorratskeller_kuhltruhe: Entity is manually configured, skipping auto configuration
2023-03-12 19:47:03.267 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.buro_schreibtisch: Entity is manually configured, skipping auto configuration
2023-03-12 19:47:03.267 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_kuhlschrank: Entity is manually configured, skipping auto configuration
2023-03-12 19:47:03.267 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_kuhlschrank_led: Auto discovered model (manufacturer=TP-Link, model=HS110(EU))
2023-03-12 19:47:03.267 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.kuche_kuhlschrank_led: Already setup with discovery, skipping new discovery
2023-03-12 19:47:03.267 DEBUG (MainThread) [custom_components.powercalc.discovery] light.esszimmer_stehleuchte: Auto discovered model (manufacturer=Signify Netherlands B.V., model=Hue white A60 bulb E27 1050lm with Bluetooth (929002469202))
2023-03-12 19:47:03.313 DEBUG (MainThread) [custom_components.powercalc.discovery] light.esszimmer_stehleuchte: Model not found in library, skipping discovery
2023-03-12 19:47:03.314 DEBUG (MainThread) [custom_components.powercalc.discovery] light.buro_deckenlicht: Auto discovered model (manufacturer=SONOFF, model=Zigbee two way smart switch (ZBMINI))
2023-03-12 19:47:03.316 DEBUG (MainThread) [custom_components.powercalc.discovery] light.kuche_deckenlicht: Auto discovered model (manufacturer=SONOFF, model=Zigbee two way smart switch (ZBMINI))
2023-03-12 19:47:03.317 DEBUG (MainThread) [custom_components.powercalc.discovery] light.flur_treppenlicht: Auto discovered model (manufacturer=SONOFF, model=Zigbee two way smart switch (ZBMINI))
2023-03-12 19:47:03.317 DEBUG (MainThread) [custom_components.powercalc.discovery] light.wohnzimmer_stehleuchte_vorne: Auto discovered model (manufacturer=TuYa, model=Smart plug (with power monitoring) (TS011F_plug_1))
2023-03-12 19:47:03.319 DEBUG (MainThread) [custom_components.powercalc.discovery] light.wohnzimmer_stehleuchte_vorne: Model not found in library, skipping discovery

Diagnostics dump or YAML config

No response

@Pantastisch Pantastisch added the bug Something isn't working label Mar 12, 2023
@bramstroker
Copy link
Owner

The problem would be the ZBMINI is a profile for smart switches, but your entity is a light light.buro_deckenlicht.
Powercalc checks if the entity is in fact a switch.* entity and skips when this is not the case.
Which integration do you use to integrate the sonoff devices in HA and how does it know it is a light and not a switch?

@Pantastisch
Copy link
Contributor Author

I see the issue, thanks for the hint!

zigbee2mqtt automatically changes the configuration of the device to a light.
The device is usually meant as a smart wall switch replacement.
Due to the nature of this device, it can be used either as a light or a switch.

As I see the module schema, it is currently not possible, to have two device_type values. 🙈

            "0x80.......": {
                "friendly_name": "Büro Deckenlicht",
                "homeassistant": {
                    "light": {
                        "state_value_template": "{{ value_json.state }}",
                        "value_template": null
                    },
                    "switch": {
                        "object_id": "light",
                        "type": "light"
                    }
                }
            },

@Pantastisch
Copy link
Contributor Author

The device is integrated by the mqtt integration with homeassistant auto detection

@bramstroker
Copy link
Owner

I see. Could you have a look info config/.storage/core.entity_registry file and search for the entity, and than share the JSON. Might be some informatie in there where we can distinguish this.

Check in Powercalc is done here:
https://github.com/bramstroker/homeassistant-powercalc/blob/master/custom_components/powercalc/power_profile/power_profile.py#L234

Hue always creates a light entity for their smart switches, and I also added switch_as_x there which allows you to change a switch into a light (with HA helpers). This solved the same issue as you have now.
So I might just add mqtt there as well when there is no other way to distinguish.

@Pantastisch
Copy link
Contributor Author

Found a workaround:

Deleted the homeassistant configuration in zigbee2mqtt, now the device is detected as switch and I changed to a light using a helper.

Now the device is auto-detected twice:

2023-03-12 21:18:35.370 DEBUG (MainThread) [custom_components.powercalc.discovery] switch.buro_deckenlicht: Auto discovered model (manufacturer=SONOFF, model=Zigbee two way smart switch (ZBMINI)) 2023-03-12 21:18:35.378 DEBUG (MainThread) [custom_components.powercalc.discovery] light.buro_deckenlicht: Auto discovered model (manufacturer=SONOFF, model=Zigbee two way smart switch (ZBMINI)) 2023-03-12 21:18:35.379 DEBUG (MainThread) [custom_components.powercalc.discovery] Done auto discovering entities 2023-03-12 21:18:35.440 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=switch.buro_deckenlicht entity_category=None, sensor_name=Büro Deckenlicht Device Power strategy=FixedStrategy manufacturer=sonoff model=ZBMINI standby_power=0.33 unique_id=0x804b50fffeab5e26_switch_zigbee2mqtt) 2023-03-12 21:18:35.440 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: Büro Deckenlicht Device Energy 2023-03-12 21:18:35.441 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy daily (entity_id=sensor.buro_deckenlicht_device_energy_daily) 2023-03-12 21:18:35.441 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy weekly (entity_id=sensor.buro_deckenlicht_device_energy_weekly) 2023-03-12 21:18:35.441 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy monthly (entity_id=sensor.buro_deckenlicht_device_energy_monthly) 2023-03-12 21:18:35.441 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy quarterly (entity_id=sensor.buro_deckenlicht_device_energy_quarterly) 2023-03-12 21:18:35.442 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy yearly (entity_id=sensor.buro_deckenlicht_device_energy_yearly) 2023-03-12 21:18:35.442 DEBUG (MainThread) [custom_components.powercalc.sensors.power] Creating power sensor (entity_id=light.buro_deckenlicht entity_category=None, sensor_name=Büro Deckenlicht Device Power strategy=FixedStrategy manufacturer=sonoff model=ZBMINI standby_power=0.33 unique_id=a02039d95ad8f03ae1de4f5f14fa1cac) 2023-03-12 21:18:35.442 DEBUG (MainThread) [custom_components.powercalc.sensors.energy] Creating energy sensor: Büro Deckenlicht Device Energy 2023-03-12 21:18:35.442 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy daily (entity_id=sensor.buro_deckenlicht_device_energy_daily) 2023-03-12 21:18:35.442 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy weekly (entity_id=sensor.buro_deckenlicht_device_energy_weekly) 2023-03-12 21:18:35.443 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy monthly (entity_id=sensor.buro_deckenlicht_device_energy_monthly) 2023-03-12 21:18:35.443 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy quarterly (entity_id=sensor.buro_deckenlicht_device_energy_quarterly) 2023-03-12 21:18:35.443 DEBUG (MainThread) [custom_components.powercalc.sensors.utility_meter] Creating utility_meter sensor: Büro Deckenlicht Device Energy yearly (entity_id=sensor.buro_deckenlicht_device_energy_yearly)

Bildschirm­foto 2023-03-12 um 21 23 02

@bramstroker
Copy link
Owner

hmm yes, I see.
This is because the light entity which has platform switch_as_x is allowed to be discovered, but the switch.* entity itself as well.
I will remove switch_as_x from that powercalc check, because it makes no sense at all thinking more about is, because when you use this there is alway as switch entity. I added that as a possible fix for this issue #1491, but the actual fix was to allow hue.

@Pantastisch
Copy link
Contributor Author

Here the requested JSON.
I think adding switch_as_x for mqtt should fix the issue.
Maybe this is related to all switches, where a light could be plugged?

{
        "aliases": [],
        "area_id": null,
        "capabilities": null,
        "config_entry_id": "f79c7015f8b1cd121a0f593a1cdcebf2",
        "device_class": null,
        "device_id": "3855b433bc699e14539807fbfddf31c5",
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "switch.buro_deckenlicht",
        "hidden_by": "integration",
        "icon": null,
        "id": "f0b3e39fc7a9c5e301f8e7041acf586b",
        "has_entity_name": false,
        "name": null,
        "options": {},
        "original_device_class": null,
        "original_icon": null,
        "original_name": "Büro Deckenlicht",
        "platform": "mqtt",
        "supported_features": 0,
        "translation_key": null,
        "unique_id": "0x80......._switch_zigbee2mqtt",
        "unit_of_measurement": null
      },
{
        "aliases": [],
        "area_id": null,
        "capabilities": {
          "supported_color_modes": [
            "onoff"
          ]
        },
        "config_entry_id": "a02039d95ad8f03ae1de4f5f14fa1cac",
        "device_class": null,
        "device_id": "3855b433bc699e14539807fbfddf31c5",
        "disabled_by": null,
        "entity_category": null,
        "entity_id": "light.buro_deckenlicht",
        "hidden_by": null,
        "icon": null,
        "id": "ebe9008e606db6b63524b2580364191c",
        "has_entity_name": false,
        "name": null,
        "options": {},
        "original_device_class": null,
        "original_icon": null,
        "original_name": "Büro Deckenlicht",
        "platform": "switch_as_x",
        "supported_features": 0,
        "translation_key": null,
        "unique_id": "a02039d95ad8f03ae1de4f5f14fa1cac",
        "unit_of_measurement": null
      },

@bramstroker
Copy link
Owner

I have made a fix with #1563

Your solution to make it a light with the HA helpers is correct.
Than powercalc can just discover and create power sensor for switch.buro_deckenlicht, and ignore light.buro_deckenlicht.
Without my fix it also detects light.buro_deckenlicht because it has switch_as_x

@bramstroker
Copy link
Owner

Will make a release later this week. When you want to install the fix you can install the master branch with HACS (check allow beta versions).

@Pantastisch
Copy link
Contributor Author

Works, thanks! 😊

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

No branches or pull requests

2 participants