The Ring app for iOS allows you to specify a category for certain devices:

Occasionally, after restarting homebridge-ring, I see messages like this in my logs:
Pruning unused service 00000040-0000-1000-8000-0026BB765291 Living Room Ceiling Fan from Living Room Ceiling Fan
This message indicates that my âLiving Room Ceiling Fanâ fan device was removed from the Home app. In its place, homebridge-ring has created a new light device. When I check âLiving Room Ceiling Fanââs category in the Ring app, I see that it has been reset from âFansâ back to âLightsâ (the default).
Is it possible homebridge-ring is inadvertently overriding device categories on startup?
Steps to reproduce the behavior:
homebridge-ring. Notice that the device is successfully added to HomeKit as a fan.homebridge-ring. Itâs possible your device now shows up as a light in the Home and Ring apps.This describes the circumstances in which I experience the issue. Unfortunately, I donât have a more specific repro step 4. Iâm not sure how much time must elapse, or whether time is incidental to the actual cause.
I expect devices I configure as âFansâ to remain as âFansâ and not revert to âLightsâ.
To workaround this issue, I set the device category back to âFansâ in the Ring app, then restart homebridge-ring. Then, messages like this appear in my logs, showing that the errant light device is removed (a fan device appears in its place):
Pruning unused service 00000043-0000-1000-8000-0026BB765291 Living Room Ceiling Fan from Living Room Ceiling Fan
I run homebridge-ring as a launchd service: com.homebridge.ring.plist
{
"bridge": {
"name": "Homebridge Ring",
"username": "02:00:00:00:00:00",
"port": 50000,
"pin": "000-00-000"
},
"description": "Homebridge Ring",
"accessories": [],
"platforms": [{
"platform": "Ring",
"refreshToken": "[snip]",
"hideCameraSirenSwitch": true,
"hideAlarmSirenSwitch": true,
"hideDoorbellSwitch": true
}]
}
@smockle I have a couple z-wave fan switches hooked to my Ring Alarm and have definitely seen this issue as well. I haven't looked into it a whole lot yet, but from my original digging (months ago), it seemed like Ring was actually the problem. It seemed like if you set the type to Fan in the Ring app, and then went back later, it would be switched to Light without any outside interaction. If you are noticing that it changes right when homebridge restarts, then it is definitely possible the plugin is causing the issues. I'll look into it again soon as this is definitely annoying đ
So this is a bit ironic. I changed both of my switches back to Fans in the Ring app 2 days ago and they haven't switched back to lights since. I've restarted homebridge multiple times and turned them on/off from both HomeKit and the Ring app. I know that this was definitely an issue, but maybe Ring fixed it on there end. Can you give it another try and report back in a few days?
Mine finally switched back to lights instead of fans. We had a power blink and I added some new zwave devices around the same time, so Iâm not sure the exact cause. My best guess is that the switches report themselves as lights to the z wave hub which causes Ring to change them back. Iâll do some testing this weekend to try to reproduce. If my theory is correct, this is probably something we will need to report to Ring to get it fixed
I had the same issue yesterday and noticed that the ring reported my fan as light. I changed it back to fan in ring app and restarted homebridge again. The home app reported the type as fan correctly. Not sure if this is a ring app issue or switch issue. I am using GE Jasco switch.
@smockle I'm fairly convinced that this is a bug on Rings side, allowing the switch to self-report its type and it always reports as a light switch instead of a fan. If that is true, it will always eventually switch back to a light within Ring, which means homebridge will always eventually remove your fan accessory and add a light. I think the only real option that I have here is using the saved context for the accessory, in which case I can save the _initial_ switch type then always use that type in the future. The problem with this approach is if you have it set to a light in Ring the first time you start homerbidge, you would be unable to change it to a fan without clearing your cached accessories (which is extremely disruptive for all of your other automations). Given the downsides to both approaches, I'm not sure which way to go. Would love to get your input.
Thanks for investigating this @dgreif, and for brainstorming solutions.
I think the only real option that I have here is using the saved context for the accessory, in which case I can save the initial switch type then always use that type in the future.
This makes sense; Iâd considered a similar workaround. However, I worry itâd lead to more confusion: âBring your Ring devices into HomeKitâ is, I suspect, a more common mental model for how this plugin works, compared to âbring your Ring devices into HomeKit, unless Ring seems buggy, in which case weâll bring cached data insteadâ. Considering the principle of least surprise, Iâd suggest _not_ implementing device type caching.
In addition to causing less surprise/confusion, by not implementing caching, we wouldnât have to remove code in the future when Ring eventually fixes the bug so that a workaround is no longer needed.
Iâm okay with closing this issueâweâve determined the bug is on the Ring side, and the potential workarounds have undesirable trade-offs.
@smockle I completely agree with your logic. There are simply too many issues with handling this bug on the homebridge side. đ¤ maybe Ring will fix it some day
Incidentally, since connecting outlets to my Ring Alarm (which inspired #493), Iâve also noticed outlets occasionally revert to lights.