Leviton Decora WiFi switch woes

background –
I have several Leviton Decora WiFi switches (DH15S) and one second generation plug (D215P), they were all found automatically by HA without me including anything in my config.yaml regarding the MyLeviton app. or API.
I also bridge to my Apple Homekit, with the HAAS Homekit bridge. As well, the bridging to Hoimekit pretty much happened automatically once all the devices and entities were configured in HA.
I was tickkled pink I could use both Homekit, and the HA app to control the switches and plug, including automations and scenes.
I run HA on an Odroid N2+ standalone, and have 2 WiFi access points.

It all was working great, until one of the DH15S switches broke down. So I got another Leviton Decora WiFi switch that “Works with Homekit”, this time a second gen (D215S). I wired it as the replacement for the failed one, configured it to my WiFi network via the MyLeviton app on my iPhone. It was “found” by HA, I configured it, and was added to the other Leviton devices into the HAAS Homekit bridge. I could run the switch from HA and the MyLeviton app on my phone just fine. However, the switch would NOT show in my Homekit app on my phone, whereas all the other switches had automatically shown there via the Homekit bridge. HA on my computer showed all the Leviton devices as being in the HAAS Homekit bridge, but yet on my Homekit app on my phone the new switch would not show.

So I factory reset the switch, and attempted to add it to Homekit first, instead of to the MyLeviton app. No go, the switch is “not found”, the scan of the code does not seem to help. So I reload it to the MyLeviton app, it goes just fine, but now it does not autoimatically show in HA, like it did before…! If I want to add it, it has to be manually, via editong the config.yaml file and adding some lines to make it talk ot the MyLeviton.API, which was not needed earlier, and I have not done it.

I can control the switch via the MyLeviton app, the switch is in the same WiFi network as the rest, and it is working, I have UniFi access points and I can see in the Unifi web interface that the switch is there with the rest of them, and it has the same IP as before.

Pulling my hair (not much left as I am quite bald). The outcome I would like is to be able to have the new switch in both HA and Homekit, like the others (I do not use the MyLeviton app). Not sure it is a 1st gen .vs. 2nd gen Decora issue, as I have a 2nd gen plug that is working just fine in both HA and Homekit, and has the same firmware version (latest). For some reason HA is not recognizing the new switch on the network. Yu9 can see below that the placeholder for it in my HA Overview panel, which I have no idea why it has not been deleted, since I deleted the device when I tried to start all over again (maybe this is the issue ?) Does HA keep track that I deleted it and wil not re-aquire it ?

1- deleted device from MyLeviton Home
2- reset switch to factory settings
3- turned off power to it
4- deleted all related “devices” and “entities” from HA
5- turn on power to switch
6- incorporate into HA
7- HA HomeKit bridge automaticall shows device in HomeKit on iPhone.

1 Like