Wink relay buttons controlling zwave devices

If mqtt is integrated in HA, try this for your automation:

- alias: whatever_you_want_to_call_this
  trigger:
  - platform: mqtt
    topic: “OfficeRelay/buttons/0”
  action:
  - service: switch.toggle
    entity_id: switch.dz15s_1bz_decora_smart_switch_switch

Using “automation:” ?

Yes, if your automations are stored in configuration.yaml.

You would do the following (no ident on automation):

automation:
  - alias: whatever_you_want_to_call_this
    trigger:
    - platform: mqtt
      topic: “OfficeRelay/buttons/0”
    action:
    - service: switch.toggle
      entity_id: switch.dz15s_1bz_decora_smart_switch_switch

I have tried every possible trigger variation from the mqtt client log. It doesnt turn the light on. Any way to test my automation? No errors in the log

Do you have mqtt integrated in home assistant? It will not do anything if you don’t have mqtt set up properly. And can you turn that switch on/off in home assistant without the automation? Switch entity exactly correct from home assistant developer tools?

Yes because i can see the humidity and temperature from the wink relay sensors on the dashboard. The name i copied from an existing working light switch.

So for that to be true I assume you have mqtt auto discovery turned on, true? What is the temp mqtt topic?

Under developer tools, can you execute the automation directly and toggle the zwave switch? If that works you don’t have the mqtt portion correct. But I’m running out of suggestions based on what you are reporting.

OfficeRelay/sensors/tempature

I dont get why its not working.

In dev tools under services if i select the automation trigger. The light turns on. Everything works
Now why in the world doesnt it work from the wink relay

Wherever you can see the mqtt topics, does pushing the relay button just change the 1 at the end of this (to 0 or 2)?

OfficeRelay/buttons/0/click/1

If it does try OfficeRelay/buttons/0/click as your topic trigger. We are trying to find the topic that changes on the button push.

I didn’t think to ask but make sure you reload the automations whenever you change them

By reloading automations i restart home assistant everytime.

Unless i am missing something from my config file

Yes that works too. You can also go to configuration --> server controls and just reload automations. Will save you some loading time.

Check the topic question in last message. Let me know

OfficeRelay/buttons/0/click/1 does not change

But payload it shows ON then next click OFF

In my config i am using trigger not toggle. When i test automation as toggle it does not turn on light. Only with trigger. (Dev tools).

I will make a screenshoot shortly. I am using a mqtt client to look at output on a laptop if that changes anything.