Hi to all,
I have a Shelly 1 PM that work fine with this mqtt switch configuration:
- name: "Shelly 1PM condizionatori - Switch"
state_topic: "shellies/shelly1pm-consumi-condizionatori/status/switch:0"
value_template: "{{ value_json.output }}"
state_on: true
state_off: false
command_topic: "shellies/shelly1pm-consumi-condizionatori/rpc"
payload_on: '{"id":1, "src": "homeassistant", "method": "Switch.Set", "params":{"id":0,"on":true}}'
payload_off: '{"id":1, "src": "homeassistant", "method": "Switch.Set", "params":{"id":0,"on":false}}'
optimistic: false
qos: 0
Now I’m trying to configure a Shelly 2PM with a mqtt light configuration like this:
- name: "Luce penisola"
state_topic: "shellies/shelly25_cucina/status/switch:0"
state_value_template: "{{ value_json.output }}"
command_topic: "shellies/shelly25_cucina/rpc"
payload_on: '{"id":1, "src": "homeassistant", "method": "Switch.Set", "params":{"id":0,"on":true}}'
payload_off: '{"id":1, "src": "homeassistant", "method": "Switch.Set", "params":{"id":0,"on":false}}'
optimistic: false
qos: 0
retain: false
I tried a lot but nothig. Light status of litgh is always “unknown”.
Someone can help me please?