Jason-Morcos / homebridge-magic-occupancy

Occupancy sensor linked to one or more switches with a built-in delay not-unoccupied delay for Homebridge
GNU General Public License v3.0
78 stars 3 forks source link

Add serial number #25

Closed cardentey closed 2 years ago

Jason-Morcos commented 2 years ago

Thanks for the pull request! What will this do for people's existing automations? Does changing the serial for the device remove any existing HomeKit automations?

cardentey commented 2 years ago

hi, unfortunately I think it will remove any automation 😞

Jason-Morcos commented 2 years ago

How about tweaking it to make the serial optional and falling back on the existing hard-coded value if not specified? That would make it a non-breaking change to ease the release/migration?

cardentey commented 2 years ago

Hi, very good idea, I have made the changes.

Jason-Morcos commented 2 years ago

Looks good! Have you tested that this change will now not break any existing automations? I assume it shouldn't, but never hurts to test

darrenmcuk commented 2 years ago

Asking a quick question….what should be the serial number format then for new sensors to do this right then?

Jason-Morcos commented 2 years ago

I think you should just be able to make up a random number-letter combo! Give it a try and see, let me know if you have any issues