Skip to content

Instantly share code, notes, and snippets.

@beauwest
Created July 30, 2021 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save beauwest/4cd028a5221af5ffae4e9b8895498a9c to your computer and use it in GitHub Desktop.
Save beauwest/4cd028a5221af5ffae4e9b8895498a9c to your computer and use it in GitHub Desktop.
Home Assistant: Always On Switch
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment