I’m trying to configure a Shelly 2PM Plus (gen 2) with MQTT.
I don’t want to use other integrations.
Many examples refer to Gen 1 devices but Gen 2 work different on MQTT.
My MQTT config for light devices is:
- name: shelly_dining
unique_id: shellyplus2pm-dining
state_topic: "shellies/shellyplus2pm-dining-living/status/switch:0"
state_value_template: >-
{{ value_json.output }}
command_topic: "shellies/shellyplus2pm-dining-living/rpc"
payload_on: '{"method":"Switch.Set","params": {"id":0,"on":true}}'
payload_off: '{"method":"Switch.Set","params": {"id":0,"on":false}}'
- name: shelly_living
unique_id: shellyplus2pm-living
state_topic: "shellies/shellyplus2pm-dining-living/status/switch:1"
state_value_template: >-
{{ value_json.output }}
command_topic: "shellies/shellyplus2pm-dining-living/rpc"
payload_on: '{"method":"Switch.Set","params": {"id":1,"on":true}}'
payload_off: '{"method":"Switch.Set","params": {"id":1,"on":false}}'
but the state views give me always unavailable. but if I click on the entity button, I see this pic and the two buttons work without visual feedback (the light really turn off and on).
Where is the error?