Light.turn_on will not activate my Leviton Z-Wave Light Switches

I am using Home Assistant Yellow.

I am have a problem getting my Leviton Light switches to works with my automation. They work perfectly when I control them individually, they just don’t activate with any kind of automation.

I also have a Honeywell Switch that works perfectly with my automation.

So here is my code that works with the Honeywell light switch but will not work with a Leviton light switch.

This code above work perfectly with the Honeywell Switch. If I change the device_id to any of my Leviton Switches, the automation will not light.

I have been working on this for days with no success. Any help would be much appreciated.

Thanks in advance.

Are they lights or switches?

switch.turn_on

Leviton DZ15S Light Switches

These light switches automated great when I was using Smartthings. This problem started when I changed to Home Assistant Yellow.

Likely it is switch in HA if it does not dim

Look at entity_id. It will be switch.thislight or light.thislight

Try changing light.turn_on to switch.turn_on or homeassistant.turn_on generically switches both light and switch

Look at developer tools >> services
Here you can test this to see what works and may also see all available services

light.turn_on turns on my Honeywell Light Switch, not my Leviton light switch. switch.turn_on does not work on my light switches but Thank You! for trying.

OK, I will look into this.
Thank You

Also

I have never used device ID. Not sure if it is better in some case but entity_id is better in my opinion

If you change device you only need to change the devices entity ID in one location vs change device ID in all automation/scenes. Again, I never use device ID so this may not be true.

1 Like

tmjpugh

You are a genius. homeassistant.turn_on did the trick !

Wow, it’s flipping working.

Thank you very much for the help !

OK,

Thank you again.

Avoid using device ids and those will change if you replace the device, etc.

Much more stable to use entity ids.

The DZ15S shows as a switch not a light natively. Switch.turn_on would work. But what I’ve done is gone to the devices and clicked show as ‘light’, then light turn on works fine. Calling a service that isn’t the domain of the entity won’t work.

See screen, you can see I’ve clicked on the original switch and changed the show as to ‘light’. The Switch entity gets hidden and a light entity gets created.