Naming sensor.wiser_heathub
-
Initial situation:The integration create sensor for the hub "WiserHeat045XXX" : sensor.wiser_heathub_signal I use the sensor in my dashboards
-
New situation: If we add another hub "WiserHeat03FXXX" in the HA configuration, the integration create sensor for the new heathub.... sensor.wiser_heathub_signal_2 used in dashboards.
When I restart HA :
- the second hub "WiserHeat03FXXX" is initialized first and and set sensor.wiser_heathub_signal
- the first "WiserHeat045XXX" hub is initialized after and set sensor.wiser_heathub_signal_2
Is it possible to name the sensor.wiser_heathubxxxxxx_signal with xxxxxx is the hostname of the hub Network.AccessPoint.NetworkInterface.HostName "WiserHeatXXXXXX"
Christian, I did look at this originally and could not get it to do what you are saying, so left it to come back to later.
I have now been having another look and still cannot get this to happen. Equally, the unique id for each of these entities does have the hub name in it, so I don't see how that could get swapped.
Can you confirm that this is actually happening and any other method I can try to replicate? Thanks and sorry for long wait on looking at it again.
For info I have tried this.
- Added WiserHeat03xxx which has sensor.wiser_heathub_signal
- Added WiserHeat02xxx which has sensor.wiser_heathub_signal_2
- Restarted HA
- Confirmed that sensor.wiser_heathub_signal belonged to WiserHeat03xxx and signal_2 to WiserHeat02xxx
- Removed WiserHeat03xxx
- Restarted HA
- Added WiserHeat03xxx
- Confirmed sensor.wiser_heathub_signal belonged to WiserHeat03xxx and signal_2 to WiserHeat02xxx
@msp1974
When I reported this issue, this is what I got.
I got this behavior after several HA restarts. For me, the integration did not always start with the same hub, so the data relating to hub 1 ended up in that of hub 2. I notice that because I have a hub V1 and one V2 providing some different data. As a result, the dashboards swapped the displays. According to my analysis, we could not guarantee in your example the sensor.wiser_heathub_signal is always update by WiserHeat03xxx...
This is why I named the hub by its name heathub03xxx.