Skip to content

Instantly share code, notes, and snippets.

@bbigras
Last active April 28, 2026 16:38
Show Gist options
  • Select an option

  • Save bbigras/d373cb70598939ca59843f00b8e9745e to your computer and use it in GitHub Desktop.

Select an option

Save bbigras/d373cb70598939ca59843f00b8e9745e to your computer and use it in GitHub Desktop.
home-assistant: watch The Majority Report live
alias: Watch The Majority Report live
triggers:
- value_template: "{{ state_attr('sensor.the_majority_report_w_sam_seder', 'live') == true }}"
trigger: template
conditions:
- condition: template
value_template: >-
{{ 'occupied' in
state_attr('binary_sensor.magic_areas_presence_tracking_interior_area_state',
'states') }}
actions:
- action: script.turn_on
target:
entity_id: script.majority_report_notification
mode: single
sensor:
- platform: youtube
channel_id: UC-3jIAlnQmbbVMV6gR7K8aQ
scan_interval: 300
alias: Majority Report — Confirmation Notification
use_blueprint:
path: homeassistant/confirmable_notification.yaml
input:
notify_device: 75f57e03bef2070c14fc5c2dbec81d86
title: The Majority Report
message: TMR is live. Watch?
confirm_text: Watch
dismiss_text: Ignore
confirm_action:
- if:
- condition: state
entity_id: media_player.android_tv_192_168_0_42
state: "off"
then:
- action: remote.turn_on
target:
entity_id: remote.onn_streaming_device_4k_pro_remote
data: {}
- wait_for_trigger:
- trigger: state
entity_id: media_player.android_tv_192_168_0_42
from: "off"
timeout:
seconds: 30
continue_on_timeout: false
- delay:
seconds: 3
- action: androidtv.adb_command
target:
entity_id: media_player.android_tv_192_168_0_42
data:
command: >-
am start -a android.intent.action.VIEW -p org.smarttube.stable -d
"{{ state_attr('sensor.the_majority_report_w_sam_seder', 'url') }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment