Keep switches turned on all the time

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

This blueprint will attempt to keep any switch turned on all the time. This can be useful for any switch that should never be turned off, for example, ZWave plug-in switches that are used solely for power monitoring.

Blueprint Code

blueprint:
  name: Always On Switch
  description: Keep the selected switch on, even when it is turned off. This should be used for switches you never want to be turned off.
  domain: automation
  input:
    target_switch:
      name: Target Switch
      description: The switch that will always be kept on.
      selector:
        entity:
          domain: switch

mode: single
max_exceeded: silent

trigger:
  - platform: homeassistant
    event: start
  - platform: state
    entity_id: !input target_switch
    to: "off"

action:
  - service: switch.turn_on
    entity_id: !input target_switch
5 Likes

How is this put into HA