honkmaster / homebridge-mi-flower-care

Homebridge plugin for the Xiaomi Mi Flora / Flower Care devices.
41 stars 16 forks source link

Set the accessory displayName attribute #7

Closed arouanet closed 6 years ago

arouanet commented 6 years ago

Hi Tobias,

Thanks for this Homebridge plugin for the Xiaomi Mi Flora, it works really well!

This tiny patch simply sets the accessory displayName attribute, as it is expected by fakegato-history as part of the file name when using the filesystem storage. Without this change the file is called something like raspberrypi_undefined_persist.json and could conflict with other plugins.

Another way to fix it would be to rename the name attribute to displayName, but this touches more lines of code and I didn't know whether you wanted this so I simply added another attribute. I'm happy to change the PR if you prefer.

honkmaster commented 6 years ago

Thanks.