Skip to content

Instantly share code, notes, and snippets.

@lordneon
Last active November 20, 2022 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordneon/140d47cd09e34d2737ad98290483a558 to your computer and use it in GitHub Desktop.
Save lordneon/140d47cd09e34d2737ad98290483a558 to your computer and use it in GitHub Desktop.

Shelly Plus1 Home Assistant MQTT Configuration

On the shelly web interface:

  • RPC status notifications over MQTT: Set this to ON (default ON)
  • Generic status update over MQTT: Set this to ON (default OFF)
mqtt:
  light:
    - name: "Some Light"
      schema: template
      unique_id: some_room
      state_topic: "shellyplus1-<ID>/status/switch:0"
      state_template: "{% if value_json.output is true %}on{%else%}off{%endif%}"
      command_topic: "shellyplus1-<ID>/rpc"
      command_on_template: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 0, "on": true} }'
      command_off_template: '{"id": 1, "src":"homeassistant", "method": "Switch.Set", "params": {"id": 0, "on": false} }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment