# SONOFF S20_02
switch:
  - platform: mqtt
    unique_id: studio_switch
    name: "Studio Schalter"
    state_topic: "/SmartHome/Sonoff/S20_02/stat/POWER1"
    command_topic: "/SmartHome/Sonoff/S20_02/cmnd/power"
    availability_topic: "/SmartHome/Sonoff/S20_02/tele/LWT"
    payload_available: "Online"
    payload_not_available: "Offline"
    payload_on: "ON"
    payload_off: "OFF"
    state_on: "on"
    state_off: "off"
    retain: true

mqtt:
  switch:
    - unique_id: studio_switch
      name: "Studio Schalter"
      state_topic: "/SmartHome/Sonoff/S20_02/stat/POWER1"
      command_topic: "/SmartHome/Sonoff/S20_02/cmnd/power"
      availability:
        - topic: "/SmartHome/Sonoff/S20_02/tele/LWT"
          payload_available: "Online"
          payload_not_available: "Offline"
      payload_on: "ON"
      payload_off: "OFF"
      state_on: "on"
      state_off: "off"
      optimistic: false
      qos: 0
      retain: true