Does anyone know of a way to receive a notification when a the label of a device changes?
I thought the only way a device label changed is if you went in and did it manually, then saved the new settings.
Might be wrong though.
I can't think of a way, but the above is correct that this should only happen by your own manual action. The exception is if the device is a "child device" of an app or other device, e.g., if it was created by an app (like the Hue Bridge Integration or Lutron Integration apps). I haven't actually tried to do this in app or driver code but think they can re-name their own child devices. (The apps I listed are actually bad examples because they won't do this; I'm not actually aware of any that do, just stating theoretical possibilities.)
Is there a specific problem you're trying to solve? It might be better addressed with another approach.
EDIT: Wait, I see you're listing this in "Coding Questions." Does this mean you're writing an app or driver where you want this to happen? Are you doing it yourself or trying to respond to user input? If the latter, why? (Hard to give specific advice without seeing anything, but if you need a unique identifier for the Hubitat-lifetime of a device, the
.deviceID [Hubitat's ID, not the DNI] would be a good way to do that, then retrieve the label as needed.)
Yes, a coding question. I'm using the device label in a child app label.
I haven't found a way to be notified when it is changed, but I was able to find another way to work around the issue. Thanks.
If interested, how I addressed the issue can be seen here.