Skip to content

Instantly share code, notes, and snippets.

@PurelyNicole
Last active December 10, 2023 20:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PurelyNicole/09706613f71d96e79e7a901e70a9085d to your computer and use it in GitHub Desktop.
Save PurelyNicole/09706613f71d96e79e7a901e70a9085d to your computer and use it in GitHub Desktop.
Template switches to use Logitech Harmony with Home Assistant, Items in capitals should be replaced with the appropriate values on your system.
- platform: template
switches:
VIRTUAL_SWITCH_NAME:
value_template: "{{ is_state_attr('remote.REMOTE_NAME', 'current_activity', 'ACTIVITY NAME') }}"
turn_on:
service: remote.turn_on
entity_id: remote.REMOTE_NAME
data:
activity: "ACTIVITY_ID"
turn_off:
service: remote.turn_off
entity_id: remote.REMOTE_NAME
data:
activity: "-1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment