output:
  - platform: gpio
    id: humidifier_output
    pin: 4
    inverted: True

switch:
  - platform: template
    id: humidifier
    name: "Humidifier"
    optimistic: True
    restore_mode: RESTORE_DEFAULT_OFF
    turn_on_action:
      - output.turn_on: humidifier_output
      - delay: 100ms
      - output.turn_off: humidifier_output
    turn_off_action:
      - output.turn_on: humidifier_output
      - delay: 100ms
      - output.turn_off: humidifier_output
      - delay: 100ms
      - output.turn_on: humidifier_output
      - delay: 100ms
      - output.turn_off: humidifier_output
