From 10786dead35d45b92ba041fb3826fe4db33f1e4b Mon Sep 17 00:00:00 2001 From: ducoterra Date: Mon, 6 Apr 2026 11:43:52 -0400 Subject: [PATCH] add roku list tv apps --- .../device_home_assistant/home_assistant.md | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/active/device_home_assistant/home_assistant.md b/active/device_home_assistant/home_assistant.md index ab78787..14f17bf 100644 --- a/active/device_home_assistant/home_assistant.md +++ b/active/device_home_assistant/home_assistant.md @@ -25,6 +25,8 @@ - [LG TV Switch](#lg-tv-switch) - [Raspberry Pi Docker](#raspberry-pi-docker) - [Extended OpenAI Conversation](#extended-openai-conversation) + - [Templates](#templates) + - [List Roku TV Apps](#list-roku-tv-apps) ## Certificates @@ -749,4 +751,49 @@ Setting up a new llama.cpp agent: | Skip Authentication | Yes | | API Provider | OpenAI | -Model Name: `ggml-org/gpt-oss-120b-GGUF` \ No newline at end of file +Model Name: `ggml-org/gpt-oss-120b-GGUF` + +## Templates + +### List Roku TV Apps + +```yaml +{{ state_attr("media_player.right_living_room", "source_list") }} + +{% for app in tv_apps -%} +"{{ app }}" +{% endfor %} +``` + +For extended openai conversation template: + +```yaml +- spec: + name: set_tv_app + description: |- + Use this function to open an app on a tv media player. + parameters: + type: object + properties: + entity_id: + type: string + description: entity_id of the TV Media Player + source: + type: string + description: The app you want to open + required: + - entity_id + - source + function: + type: composite + sequence: + - type: script + sequence: + - service: + + - service: media_player.select_source + target: + entity_id: "{{ entity_id }}" + data: + source: "{{ source }}" +```