Skip to content

Instantly share code, notes, and snippets.

@wrboyce
Created February 27, 2019 15:29
Show Gist options
  • Save wrboyce/afdec85869675360249cd481f4f52246 to your computer and use it in GitHub Desktop.
Save wrboyce/afdec85869675360249cd481f4f52246 to your computer and use it in GitHub Desktop.
switch:
- platform: template
switches:
lounge_tv:
friendly_name: Lounge TV
value_template: "{{ state_attr('switch.lounge_tv_plug', 'current_power_w') | float > 25 }}"
icon_template: mdi:television
turn_on:
service: remote.turn_on
entity_id: remote.lounge_tv
turn_off:
service: remote.turn_off
entity_id: remote.lounge_tv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment