FilipDem / Domoticz-NEST-plugin

NEST Plugin for Domoticz using the Google credentials.
13 stars 4 forks source link

Cannot Change device name #6

Closed AdamWeglarz closed 3 years ago

AdamWeglarz commented 4 years ago

Hi,

When I change device name script stops recognizing devices and create new ones. Can you update it that it checks idx of created devices and not the name that name can be changed?

Adam

FilipDem commented 4 years ago

Hi, Can do this but there remains a problem... Now the name tells me which device it is. Ie temperature, eco, ... I still need this information. But then I need somewhere a table that keeps the relationship between the switch and the idx. And this table must be persistent to be used after a boot. The only way I see this is keeping a configuration file with the idx and switch. Every time a device is created I would need to update and synchronize it in memory. And then I would need a system when I update know the plugin and create this file based on the existing devices. But it am not sure this is the "domoticz" way to do. Any advice? Filip

Op ma 30 mrt. 2020 16:49 schreef AdamWeglarz notifications@github.com:

Hi,

When I change device name script stops recognizing devices and create new ones. Can you update it that it checks idx of created devices and not the name that name can be changed?

Adam

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FilipDem/Domoticz-NEST-plugin/issues/6, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3SGC4SLZZLRIB3GQ6RIJDRKCWQVANCNFSM4LWUWRVQ .

Tezzlicious commented 3 years ago

Why not save the 'real' name in the Description attribute/field of the domoticz device and just look for it on plugin start to match it?

markruys commented 3 years ago

I've implemented this feature and will submit a PR after some more testing.