Last active
November 23, 2022 11:30
-
-
Save Didgeridrew/2e37eb631bd357117f1b0d1464be0777 to your computer and use it in GitHub Desktop.
Sensor for use with Home Assistant Lovelace Alexa Console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
- platform: template | |
sensors: | |
alexa_selector: | |
friendly_name: "Alexa Selector Sensor" | |
value_template: > | |
{%- set room = states("input_select.alexa_state") -%} | |
{%- set echo = { | |
'Kitchen': 'kitchen_dot', | |
'All': 'everywhere', | |
'Den':'den_dot', | |
'Living Room': 'living_room_dot', | |
'Master Bedroom': 'master_bedroom_dot', | |
'Basement': 'basement_dot', | |
'Cloud Room': 'b_bedroom_dot'} %} | |
{{ 'media_player.'~echo[room]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For new HA/Alexa Media Player users: This template sensor was created to work with the following scripts:
https://gist.github.com/Didgeridrew/3c140b6620824835a7fbe9a0bd892544