sleevezipper / hass-workstation-service

Provide useful sensors and services from your workstation to Home Assistant.
Apache License 2.0
613 stars 54 forks source link

SessionStateSensor eventually changes entity ID in Home Assistant #168

Open HeedfulCrayon opened 2 years ago

HeedfulCrayon commented 2 years ago

I have an automation that sets my lights in my office based on if I am logged into my work laptop or not. To do this, I am using a SessionStateSensor named 'work_laptop_session' image

This sensor eventually ends up not working any more as it duplicates a sensor in home assistant named 'sensor.work_laptop_session_2' image image image

There is a temporary work around that involves deleting the sensor in HASS Workstation GUI and then removing 'sensor.work_laptop_session' in home assistant, and then re-adding it in HASS Workstation GUI

DavyRoswinkel commented 2 years ago

Same issue, I also think it's MQTT related as my logs show:

Logger: homeassistant.components.switch Source: helpers/entity_platform.py:593 Integration: Schakelaar (documentation, issues) First occurred: 09:35:23 (702 occurrences) Last logged: 11:34:27

Platform mqtt does not generate unique IDs. ID 198b0e1f-1bd7-49ed-bfef-a46f76dd92e8 already exists - ignoring switch.desktoppc_uitschakelen
Platform mqtt does not generate unique IDs. ID dd0faa10-4632-4394-8edc-a58d1598dbf3 already exists - ignoring switch.setrainwallpapaer
Platform mqtt does not generate unique IDs. ID fa2788fd-8592-4a74-b2ac-06330921e4c6 already exists - ignoring switch.beweging_oprit_melden
HeedfulCrayon commented 2 years ago

If it is MQTT related, it is likely the autodiscovery in hass-workstation-service isn't quite right. I haven't experienced this in other integrations