Closed Clam58 closed 1 year ago
This is an expected change, as before the HE Name, Label and Type where used differently https://github.com/jason0x43/hacs-hubitat/commit/917d6c1f6ece15dd05e9bb1474ebac08dcbf744b
I had to drop all my previous devices and let the integration recreate them.
@jason0x43 Should add a small note about the behavior / breaking change
Thanks for clarifying this as expected.
Up to now I’ve used the device label in Hubitat to match the entity name in HA. I’ve left the device name to match its type, which gives me what I want in the Hubitat UI, and was consistent in HA. Is there a case for mapping through the label if present in Hubitat, reverting to the name if not?
Regards
Let me look at this later today and if its a bug i'll send a pr.
@jason0x43 do you think it would be possible to add an option to allow the users to select if they want to use the HE name or label as HA name, what do you think?
Based on Hubitat's behavior, I think we should return the Hubitat label
property as the HA name if label
is defined, and use the Hubitat name
property otherwise.
That will allow users who don't define labels to use name
, and users that have have defined labels won't need to change anything.
@Clam58 Give v0.9.1 a try.
That seams like a good compromise, we just need to check it has been defined or not
we just need to check it has been defined or not
It's actually always defined (I just tested it). The label
property returned by Maker API has the desired behavior by itself -- it will be the device's label
property if the user has set a label, otherwise it will be the device's name
property. So we could go back to always using the Hubitat label
property for HA's name
.
@Clam58 Give v0.9.1 a try.
Yes, that does exactly what I want.
Thanks!
Should this change rename things back? I think I'm on v0.9.1, but my names are still the "name" field, which is very useless...
@jason0x43 Reload the integration or restart it, it should refresh all you devices
Tried... Entities look fine, but Device names are still all messed up.
Ah, I think I see the issue.
@jhstroebel Give v0.9.2 a try.
That did it. Thank you!
Actually, another place...
The initial exclude menu in configuration pulls the new labels, but the "Switches -> Lights" and the "Lights -> Switches" options still are pulling the name instead of the label.
Not a massive issue for me at the moment.
I very much appreciate your quick change for v0.9.2 to get those changed! THANK YOU!
Do we still use the name if no user defined labels have been defined?
Yes -- that's how the Maker API works. The value it sends for a device's "label" property will be the label from the Hubitat device page if the user has set one, or the name otherwise.
Just updated to v0.9.0 and noticed many of my devices/entities in HA (Home Assistant 2023.4.3, Supervisor 2023.04.0, Operating System 9.5, Frontend 20230411.0 - latest) have been renamed e.g. what was named “living room lights” is now called “Aurora Zigbee Dimmer”. As I have dozens like this it is a lot of manual editing to revert. Was this change as expected, if not, can it be “fixed” without me manually editing each entity affected?
Thanks