-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace adb source detection with androidtv remote
- Add Android TV source sensors as select lists - Disable old sensors - Update universal media players with new source sensors/selectors - Add Android app id to name translations in `variables.jinja` - Update media_icon macro in `util.jinja` - Update automations to use new source sensors - Update UI to use source names and not app ids
- Loading branch information
Showing
11 changed files
with
208 additions
and
82 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# The template integration allows creating entities which derive their values | ||
# from other data. This is done by specifying templates for properties of an | ||
# entity, like the name or the state. | ||
# | ||
# https://www.home-assistant.io/integrations/template/ | ||
# | ||
select: | ||
- name: "Family Room Source" | ||
availability: '{{ has_value("media_player.family_room_shield") and has_value("media_player.family_room_androidtv") }}' | ||
state: |- | ||
{%- from "variables.jinja" import androidtv %} | ||
{%- set source = state_attr('media_player.family_room_androidtv', 'app_id') | default('off', true) -%} | ||
{%- set sources = androidtv() | from_json -%} | ||
{{ iif(source in sources, sources[source], source) }} | ||
options: |- | ||
{%- from "variables.jinja" import androidtv %} | ||
{{ (androidtv() | from_json).values() | list }} | ||
select_option: | ||
- service: media_player.select_source | ||
target: | ||
entity_id: media_player.family_room_shield | ||
data: | ||
source: |- | ||
{%- from "util.jinja" import dict_flip %} | ||
{%- from "variables.jinja" import androidtv %} | ||
{%- set sources = dict_flip(androidtv() | from_json) | from_json -%} | ||
{{ iif(option in sources, sources[option], option) }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# The template integration allows creating entities which derive their values | ||
# from other data. This is done by specifying templates for properties of an | ||
# entity, like the name or the state. | ||
# | ||
# https://www.home-assistant.io/integrations/template/ | ||
# | ||
select: | ||
- name: "Living Room Source" | ||
availability: '{{ has_value("media_player.living_room_shield") and has_value("media_player.living_room_androidtv") }}' | ||
state: |- | ||
{%- from "variables.jinja" import androidtv %} | ||
{%- set source = state_attr('media_player.living_room_androidtv', 'app_id') | default('off', true) -%} | ||
{%- set sources = androidtv() | from_json -%} | ||
{{ iif(source in sources, sources[source], source) }} | ||
options: |- | ||
{%- from "variables.jinja" import androidtv %} | ||
{{ (androidtv() | from_json).values() | list }} | ||
select_option: | ||
- service: media_player.select_source | ||
target: | ||
entity_id: media_player.living_room_shield | ||
data: | ||
source: |- | ||
{%- from "util.jinja" import dict_flip %} | ||
{%- from "variables.jinja" import androidtv %} | ||
{%- set sources = dict_flip(androidtv() | from_json) | from_json -%} | ||
{{ iif(option in sources, sources[option], option) }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# The template integration allows creating entities which derive their values | ||
# from other data. This is done by specifying templates for properties of an | ||
# entity, like the name or the state. | ||
# | ||
# https://www.home-assistant.io/integrations/template/ | ||
# | ||
select: | ||
- name: "Master Bedroom Source" | ||
availability: '{{ has_value("media_player.master_bedroom_shield") and has_value("media_player.master_bedroom_androidtv") }}' | ||
state: |- | ||
{%- from "variables.jinja" import androidtv %} | ||
{%- set source = state_attr('media_player.master_bedroom_androidtv', 'app_id') | default('off', true) -%} | ||
{%- set sources = androidtv() | from_json -%} | ||
{{ iif(source in sources, sources[source], source) }} | ||
options: |- | ||
{%- from "variables.jinja" import androidtv %} | ||
{{ (androidtv() | from_json).values() | list }} | ||
select_option: | ||
- service: media_player.select_source | ||
target: | ||
entity_id: media_player.master_bedroom_shield | ||
data: | ||
source: |- | ||
{%- from "util.jinja" import dict_flip %} | ||
{%- from "variables.jinja" import androidtv %} | ||
{%- set sources = dict_flip(androidtv() | from_json) | from_json -%} | ||
{{ iif(option in sources, sources[option], option) }} |
This file contains 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
Oops, something went wrong.