commit all changes

This commit is contained in:
2024-05-24 23:27:18 +03:00
parent 48b5ed1649
commit dd3bf75261
17 changed files with 390 additions and 635 deletions

View File

@@ -1 +1 @@
2023.11.1
2024.5.4

View File

@@ -80,16 +80,6 @@
target:
entity_id: fan.bathroom
mode: single
- id: '1699447664911'
alias: Bathroom · Motion light
description: ''
use_blueprint:
path: homeassistant/motion_light.yaml
input:
motion_entity: binary_sensor.bathroom_motion_occupancy
light_target:
entity_id: light.bathroom
no_motion_wait: 900
- id: '1699735427094'
alias: Front door · turn on lights
description: ''

View File

@@ -76,6 +76,9 @@ cards:
- automation.lighting_temperature_based_on_sun
- automation.lighting_temperature_change
- type: divider
- automation.lightning_living_room_motion_on
- automation.lightning_living_room_motion_off
- type: divider
- automation.lighting_bedroom_door_open
- type: divider
- automation.lighting_kitchen_motion_on

View File

@@ -1,267 +0,0 @@
bulsatcom_remote_card:
card:
type: picture-elements
image: /local/images/remotes/bulsatcom.png
elements:
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_power
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 6.6%
left: 22%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_mute
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 6.6%
left: 81%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_ok
tap_action:
action: toggle
style:
width: 42.1%
height: 12%
top: 23%
left: 51.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_left
tap_action:
action: toggle
style:
width: 18%
height: 5%
top: 23%
left: 19%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_right
tap_action:
action: toggle
style:
width: 18%
height: 5%
top: 23%
left: 83.8%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_up
tap_action:
action: toggle
style:
width: 50%
height: 4%
top: 14%
left: 51%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_down
tap_action:
action: toggle
style:
width: 50%
height: 4%
top: 32%
left: 51%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_back
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 39%
left: 21.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_menu
tap_action:
action: toggle
style:
width: 28%
height: 8%
top: 43.5%
left: 51.4%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_info
tap_action:
action: toggle
style:
width: 23.6%
height: 6.8%
top: 39%
left: 81.2%
border-radius: 50%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_volume_down
tap_action:
action: toggle
style:
width: 36.9%
height: 6.2%
top: 54%
left: 29.4%
border-top-left-radius: 45%
border-bottom-left-radius: 45%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_volume_up
tap_action:
action: toggle
style:
width: 36.9%
height: 6.2%
top: 54%
left: 72%
border-top-right-radius: 45%
border-bottom-right-radius: 45%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_1
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 20.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_2
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_3
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 62.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_4
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 20.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_5
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_6
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 69.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_7
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 21.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_8
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_9
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 76.5%
left: 81.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_epg
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 21.5%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_0
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 51%
border-radius: 40%
- type: image
image: /local/images/floorplan/transparent.png
entity: script.bulsatcom_clock
tap_action:
action: toggle
style:
width: 22.2%
height: 4%
top: 83.5%
left: 81.5%
border-radius: 40%

View File

@@ -66,4 +66,6 @@
action: call-service
service: "[[[ return entity.state == 'on' ? 'script.sonos_bathroom_unjoin' : 'script.sonos_bathroom_join' ]]]"
- !include ../popup_cards.yaml

View File

@@ -38,6 +38,10 @@
template: v3_chip_name
entity: binary_sensor.multisensor_6_home_security_motion_detection
name: Motion
- type: custom:button-card
template: v3_chip_name
entity: binary_sensor.trisensor_motion
name: Desk Motion
- type: horizontal-stack
cards:
- type: custom:button-card
@@ -66,6 +70,13 @@
variables:
scene_color_1: rgba(255, 0, 190, 1)
scene_color_2: rgba(0, 255, 190, 1)
- type: custom:button-card
template: v3_scene
entity: scene.living_room_ambient_christmas
name: Christmas
variables:
scene_color_1: rgba(255, 0, 0, 1)
scene_color_2: rgba(0, 255, 0, 1)
- type: custom:button-card
template: v3_scene
entity: scene.living_room_ambient_default
@@ -115,6 +126,10 @@
show_state: false
tap_action:
action: more-info
- type: custom:button-card
template: v3_button
entity: input_boolean.living_room_motion_lights
name: Auto
- type: custom:decluttering-card

View File

@@ -143,10 +143,7 @@ cards:
show_state: false
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.living_room_tv
source: Shield
service: script.tv_switch_to_shield
styles:
card:
- margin-left: 8px
@@ -163,14 +160,14 @@ cards:
entity_id: media_player.living_room_tv
source: Switch
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
name: Bulsatcom
icon: mdi:remote-tv
show_state: false
tap_action:
action: call-service
service: script.tv_bulsatcom_toggle
# - type: custom:button-card
# template: [v3_tablet_button, v3_popup_button]
# name: Bulsatcom
# icon: mdi:remote-tv
# show_state: false
# tap_action:
# action: call-service
# service: script.tv_bulsatcom_toggle
- type: custom:mini-media-player
entity: media_player.nvidia_shield
@@ -190,8 +187,6 @@ cards:
cards:
- type: custom:decluttering-card
template: hdmi_switch_remote_card
- type: custom:decluttering-card
template: bulsatcom_remote_card
- type: custom:popup-card
entity: media_player.living_room_tv
@@ -203,22 +198,54 @@ cards:
cards:
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
icon: mdi:set-top-box
name: Set to Shield
icon: mdi:apple
name: Apple TV
show_state: false
tap_action:
action: call-service
service: media_player.select_source
service_data:
entity_id: media_player.living_room_tv
source: Shield
service: script.tv_switch_to_apple_tv
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
name: Set to Switch
icon: mdi:playstation
name: PS5
show_state: false
tap_action:
action: call-service
service: script.tv_switch_to_playstation
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
icon: mdi:set-top-box
name: Shield
show_state: false
tap_action:
action: call-service
service: script.tv_switch_to_shield
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
icon: mdi:tv
name: EON
show_state: false
tap_action:
action: call-service
service: script.tv_switch_to_eon
styles:
card:
- margin-left: 8px
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
name: Switch
icon: mdi:video-input-hdmi
show_state: false
tap_action:
@@ -228,21 +255,17 @@ cards:
entity_id: media_player.living_room_tv
source: Switch
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
name: Bulsatcom
icon: mdi:remote-tv
show_state: false
tap_action:
action: call-service
service: script.tv_bulsatcom_toggle
- type: custom:mini-media-player
entity: media_player.nvidia_shield
- type: custom:mini-media-player
entity: media_player.living_room_tv
- type: custom:mini-media-player
entity: media_player.apple_tv
name: Apple TV
- type: custom:mini-media-player
entity: media_player.nvidia_shield
- type: custom:decluttering-card
template: sonos_media_player
variables:
@@ -255,8 +278,7 @@ cards:
cards:
- type: custom:decluttering-card
template: hdmi_switch_remote_card
- type: custom:decluttering-card
template: bulsatcom_remote_card
- type: custom:popup-card
entity: group.all_motion_sensors

View File

@@ -0,0 +1,54 @@
input_number:
bathroom_motion_timeout:
name: Bathroom · Motion timeout
icon: mdi:timer
initial: 900
min: 600
max: 1800
step: 1
automation:
- alias: Bathroom · Increase timeout on click
trigger:
platform: state
entity_id: sensor.bathroom_wall_switch_action
to: "single_left"
action:
- service: input_number.set_value
entity_id: input_number.bathroom_motion_timeout
data:
value: "{{ 1800 if is_state('light.bathroom', 'on') else 900 }}"
- alias: Bathroom · Motion light
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: binary_sensor.bathroom_motion_occupancy
from: "off"
to: "on"
action:
- service: light.turn_on
entity_id: light.bathroom
- wait_for_trigger:
platform: state
entity_id: binary_sensor.bathroom_motion_occupancy
from: "on"
to: "off"
- delay: "{{ states('input_number.bathroom_motion_timeout') | int }}"
- service: light.turn_off
entity_id: light.bathroom
- service: input_number.set_value
entity_id: input_number.bathroom_motion_timeout
data:
value: 900
- alias: Bathroom · Fan on if light on
trigger:
platform: state
entity_id: light.bathroom
to: "on"
for: "00:05:00"
action:
- service: fan.turn_on
entity_id: fan.bathroom

View File

@@ -1,192 +0,0 @@
script:
bulsatcom_power:
alias: Bulsatcom · Power
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020250AF" }'
bulsatcom_up:
alias: Bulsatcom · Up
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202D02F" }'
bulsatcom_down:
alias: Bulsatcom · Down
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202708F" }'
bulsatcom_left:
alias: Bulsatcom · Left
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020208F7" }'
bulsatcom_right:
alias: Bulsatcom · Right
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x02028877" }'
bulsatcom_ok:
alias: Bulsatcom · OK
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202B04F" }'
bulsatcom_1:
alias: Bulsatcom · 1
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202807F" }'
bulsatcom_2:
alias: Bulsatcom · 2
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020240BF" }'
bulsatcom_3:
alias: Bulsatcom · 3
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202C03F" }'
bulsatcom_4:
alias: Bulsatcom · 4
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020220DF" }'
bulsatcom_5:
alias: Bulsatcom · 5
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202A05F" }'
bulsatcom_6:
alias: Bulsatcom · 6
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202609F" }'
bulsatcom_7:
alias: Bulsatcom · 7
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202E01F" }'
bulsatcom_8:
alias: Bulsatcom · 8
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020210EF" }'
bulsatcom_9:
alias: Bulsatcom · 9
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202906F" }'
bulsatcom_0:
alias: Bulsatcom · 0
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020200FF" }'
bulsatcom_back:
alias: Bulsatcom · Back
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202827D" }'
bulsatcom_info:
alias: Bulsatcom · Info
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020242BD" }'
bulsatcom_menu:
alias: Bulsatcom · Menu
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020202FD" }'
bulsatcom_volume_down:
alias: Bulsatcom · Volume down
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020238C7" }'
bulsatcom_volume_up:
alias: Bulsatcom · Volume up
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202A857" }'
bulsatcom_mute:
alias: Bulsatcom · Mute
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020230CF" }'
bulsatcom_clock:
alias: Bulsatcom · Clock
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x020248B7" }'
bulsatcom_epg:
alias: Bulsatcom · EPG
sequence:
- service: mqtt.publish
data:
topic: cmnd/ir_blaster_1/IRSend
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x0202E21D" }'

View File

@@ -1,65 +1,82 @@
script:
tv_twitch:
icon: mdi:twitch
alias: TV · Start Twitch stream
tv_switch_to_eon:
sequence:
- service: script.tv_prepare_for_playback
- service: androidtv.adb_command
- if:
condition: state
entity_id: media_player.living_room_tv
state: "off"
then:
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- delay: 00:00:03
- service: script.tv_switch_to_shield
- service: media_player.select_source
entity_id: media_player.nvidia_shield
data_template:
command: "am start -a android.intent.action.VIEW -d twitch://stream/{{ channel }}"
data:
source: com.ug.eon.android.tv
tv_bulsatcom_toggle:
icon: mdi:remote-tv
alias: TV · Bulsatcom toggle
tv_switch_to_playstation:
sequence:
- service: script.bulsatcom_power
- service: media_player.turn_on
- if:
condition: state
entity_id: media_player.living_room_tv
state: "off"
then:
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- delay: 00:00:03
- service: media_player.select_source
entity_id: media_player.living_room_tv
data:
source: "PS5"
tv_switch_to_apple_tv:
sequence:
- if:
condition: state
entity_id: media_player.living_room_tv
state: "off"
then:
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- delay: 00:00:03
- service: media_player.select_source
entity_id: media_player.living_room_tv
data:
source: "Apple TV"
tv_switch_to_shield:
sequence:
- if:
condition: state
entity_id: media_player.living_room_tv
state: "off"
then:
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- delay: 00:00:03
- service: script.hdmi_switch_1
- service: media_player.select_source
entity_id: media_player.living_room_tv
data:
source: Switch
latest_pds:
alias: Play the latest PDS
tv_screensaver:
sequence:
- service: media_extractor.play_media
entity_id: media_player.shield
data_template:
media_content_id: "{{ state_attr('sensor.philip_defranco', 'url') }}"
media_content_type: video/youtube
- service: script.tv_switch_to_apple_tv
- delay: 00:00:05
- service: remote.send_command
entity_id: remote.apple_tv
data:
command: "home"
num_repeats: 2
- service: remote.send_command
entity_id: remote.apple_tv
data:
command: "menu"
tv_prepare_for_playback:
alias: TV · Prepare for playback
sequence:
- service: media_player.unjoin
entity_id: media_player.living_room
- service: media_player.select_source
entity_id: media_player.living_room
data:
source: TV
- service: media_player.volume_set
entity_id: media_player.living_room
data_template:
volume_level: "{{ volume_level | default(0.3) }}"
- service: media_player.turn_on
entity_id: media_player.nvidia_shield
- service: media_player.select_source
entity_id: media_player.living_room_tv
data:
source: Shield
shield_screensaver:
sequence:
- service: media_player.turn_on
entity_id: media_player.nvidia_shield
- service: androidtv.adb_command
entity_id: media_player.nvidia_shield
data:
command: "adb shell am start -n \"com.android.systemui/.Somnambulator\""
automation:
- alias: TV · Turn on
@@ -82,22 +99,74 @@ automation:
state: "day"
action:
- service: script.sonos_join_bedroom
- service: logbook.log
data:
name: "📺 Media Module · "
message: "Sonos Group · TV off - joining Beam to Sonos Group ··"
domain: media_player
- alias: TV · State · Sync TV state
- alias: TV · State · Turn on STBs
mode: single
trigger:
platform: state
entity_id: media_player.living_room_tv
to: "on"
action:
- service: media_player.turn_on
entity_id: media_player.nvidia_shield
- service: remote.send_command
entity_id: remote.apple_tv
data:
command: wakeup
- alias: TV · Off · Turn off devices
mode: single
trigger:
platform: state
entity_id: media_player.living_room_tv
to: "off"
condition: "{{ not is_state('media_player.nvidia_shield', 'off') }}"
action:
- service: media_player.turn_off
entity_id: media_player.nvidia_shield
- service: remote.send_command
entity_id: remote.apple_tv
data:
command: suspend
- alias: TV · State · Sync Apple TV state
trigger:
- platform: state
entity_id: media_player.apple_tv
to: "standby"
id: "off"
- platform: state
entity_id: media_player.apple_tv
to: "off"
id: "off"
- platform: state
entity_id: media_player.apple_tv
from: "standby"
to: "paused"
id: "on"
- platform: state
entity_id: media_player.apple_tv
to: "idle"
id: "on"
- platform: state
entity_id: media_player.apple_tv
from: "off"
to: "playing"
id: "on"
action:
- choose:
- conditions: "{{ trigger.id == 'on' and not is_state('media_player.living_room_tv', 'on') }}"
sequence:
- service: script.tv_switch_to_apple_tv
- service: remote.send_command
entity_id: remote.apple_tv
data:
command: home
num_repeats: 2
- conditions: "{{ (trigger.id == 'off' or trigger.id == 'standby') and not is_state('media_player.living_room_tv', 'off') }}"
sequence:
- service: media_player.turn_off
entity_id: media_player.living_room_tv
- alias: TV · State · Sync Shield state
trigger:
@@ -119,22 +188,12 @@ automation:
- choose:
- conditions: "{{ trigger.id == 'on' and not is_state('media_player.living_room_tv', 'on') }}"
sequence:
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- delay: "00:00:15"
- service: media_player.select_source
entity_id: media_player.living_room_tv
data:
source: "Shield"
- service: script.tv_switch_to_shield
- conditions: "{{ trigger.id == 'off' and not is_state('media_player.living_room_tv', 'off') }}"
sequence:
- service: media_player.turn_off
entity_id: media_player.living_room_tv
- service: logbook.log
data_template:
name: "📺 Media Module · "
message: "Sync TV state · Turning TV {{ trigger.id }} - Shield is {{ trigger.id }} ··"
domain: media_player
- alias: TV · Prepare for casting
trigger:
@@ -144,11 +203,6 @@ automation:
condition: "{{ is_state_attr('media_player.nvidia_shield', 'source', 'Google Cast') }}"
action:
- service: script.sonos_join_tv
- service: logbook.log
data:
name: "📺 Media Module · "
message: "TV · Google Cast - Joining Sonoses"
domain: media_player
- delay: "00:00:10"
- service: media_player.select_source
entity_id: media_player.living_room_tv
@@ -163,3 +217,45 @@ homeassistant:
media_player.nvidia_shield:
icon: mdi:set-top-box
friendly_name: Nvidia Shield
# tv_twitch:
# icon: mdi:twitch
# alias: TV · Start Twitch stream
# sequence:
# - service: script.tv_prepare_for_playback
# - service: androidtv.adb_command
# entity_id: media_player.nvidia_shield
# data_template:
# command: "am start -a android.intent.action.VIEW -d twitch://stream/{{ channel }}"
# latest_pds:
# alias: Play the latest PDS
# sequence:
# - service: media_extractor.play_media
# entity_id: media_player.shield
# data_template:
# media_content_id: "{{ state_attr('sensor.philip_defranco', 'url') }}"
# media_content_type: video/youtube
# tv_prepare_for_playback:
# alias: TV · Prepare for playback
# sequence:
# - service: media_player.unjoin
# entity_id: media_player.living_room
# - service: media_player.select_source
# entity_id: media_player.living_room
# data:
# source: TV
# - service: media_player.volume_set
# entity_id: media_player.living_room
# data_template:
# volume_level: "{{ volume_level | default(0.3) }}"
# - service: media_player.turn_on
# entity_id: media_player.nvidia_shield
# - service: media_player.select_source
# entity_id: media_player.living_room_tv
# data:
# source: Shield

View File

@@ -53,10 +53,10 @@ script:
entity_id: binary_sensor.someone_home
state: "on"
- service: climate.turn_on
data_template:
data:
entity_id: "{{ entity_id }}"
- service: climate.set_temperature
data_template:
data:
entity_id: "{{ entity_id }}"
temperature: >-
{% if entity_id == 'climate.living_room_valve' %}
@@ -76,11 +76,11 @@ script:
- conditions: "{{ is_state(entity_id, 'off') }}"
sequence:
- service: script.maybe_turn_radiator_on
data_template:
data:
entity_id: "{{ entity_id }}"
default:
- service: climate.turn_off
data_template:
data:
entity_id: "{{ entity_id }}"
turn_on_all_radiators:
@@ -121,48 +121,48 @@ automation:
action:
- service: input_number.set_value
entity_id: input_number.radiators_temperature
data_template:
data:
value: >-
{% if trigger.id === '5' %}
{% if trigger.id == '5' %}
25
{% elif trigger.id === '11' %}
{% elif trigger.id == '11' %}
23
{% elif trigger.id === '16' %}
{% elif trigger.id == '16' %}
22
{% endif %}
- service: input_number.set_value
entity_id: input_number.living_room_radiator_temperature
data_template:
data:
value: >-
{% if trigger.id === '5' %}
{% if trigger.id == '5' %}
25
{% elif trigger.id === '11' %}
{% elif trigger.id == '11' %}
25
{% elif trigger.id === '16' %}
{% elif trigger.id == '16' %}
25
{% endif %}
- service: input_number.set_value
entity_id: input_number.bedroom_radiator_temperature
data_template:
data:
value: >-
{% if trigger.id === '5' %}
{% if trigger.id == '5' %}
25
{% elif trigger.id === '11' %}
{% elif trigger.id == '11' %}
23
{% elif trigger.id === '16' %}
{% elif trigger.id == '16' %}
22
{% elif trigger.id === '22' %}
{% elif trigger.id == '22' %}
20
{% endif %}
- service: input_number.set_value
entity_id: input_number.kitchen_radiator_temperature
data_template:
data:
value: >-
{% if trigger.id === '5' %}
{% if trigger.id == '5' %}
25
{% elif trigger.id === '11' %}
{% elif trigger.id == '11' %}
22
{% elif trigger.id === '16' %}
{% elif trigger.id == '16' %}
20
{% endif %}

View File

@@ -1,3 +1,10 @@
input_boolean:
living_room_motion_lights:
name: "Living Room Ambient"
initial: on
icon: mdi:lightbulb-auto
automation:
- alias: "Lightning · Living room · Motion on"
trigger:
@@ -17,6 +24,10 @@ automation:
- condition: state
entity_id: sensor.house_mode
state: 'day'
- condition: state
entity_id: input_boolean.living_room_motion_lights
state: 'on'
action:
- service: light.turn_on
@@ -36,6 +47,10 @@ automation:
to: "off"
for:
minutes: 5
condition:
- condition: state
entity_id: input_boolean.living_room_motion_lights
state: 'on'
action:
- service: light.turn_off
entity_id:
@@ -48,6 +63,17 @@ automation:
- light.hue_ambiance_7
scene:
- name: Living Room Ambient Christmas
icon: mdi:pine-tree
entities:
light.light_lohas_2:
state: "on"
rgb_color: [0, 255, 0]
brightness_pct: 100
light.living_room_ambient_main:
state: "on"
rgb_color: [255, 0, 0]
brightness_pct: 100
- name: Living Room Ambient Neon
icon: "mdi:weather-night"
entities:

View File

@@ -88,16 +88,16 @@ light:
- platform: group
name: On after dark
entities:
# # LR main
# - light.light_le_1
# - light.light_le_2
# - light.light_le_3
# - light.light_le_4
# # PC
# - light.hue_ambiance_7
# # LR ambiance
# - light.living_room_ambient_main
# - light.light_lohas_2
# LR main
- light.light_le_1
- light.light_le_2
- light.light_le_3
- light.light_le_4
# PC
- light.hue_ambiance_7
# LR ambiance
- light.living_room_ambient_main
- light.light_lohas_2
- light.master_bedroom_main
- light.bedside

View File

@@ -15,24 +15,36 @@ script:
entity_id: media_player.living_room
data:
source: TV
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- wait_template: "{{ is_state('media_player.nvidia_shield', 'standby') or is_state('media_player.nvidia_shield', 'idle') }}"
- service: androidtv.adb_command
target:
entity_id: media_player.nvidia_shield
data:
command: "HOME"
- service: script.tv_switch_to_apple_tv
- wait_template: "{{ is_state('media_player.apple_tv', 'idle') or is_state('media_player.apple_tv', 'paused') }}"
- service: media_player.select_source
entity_id: media_player.nvidia_shield
entity_id: media_player.apple_tv
data:
source: "Plex"
- delay: 00:00:01
- service: remote.send_command
entity_id: remote.apple_tv
data:
command: "select"
- service: media_player.play_media
entity_id: media_player.plex_shield
entity_id: media_player.apple_tv
data_template:
media_content_type: "EPISODE"
media_content_id: '{ "library_name": "TV Shows", "show_name": "{{ states("input_text.plex_default_show")}}", "episode.unwatched": true, "episode.inProgress": [true, false], "resume": 1, "sort": "addedAt:asc", "maxresults": 1 }'
- service: button.press
entity_id: button.scan_clients_cobalt
- wait_template: "{{ not is_state('media_player.plex_apple_tv', 'unavailable') }}"
- service: media_player.play_media
entity_id: media_player.plex_apple_tv
data_template:
media_content_type: "EPISODE"
media_content_id: '{ "library_name": "TV Shows", "show_name": "{{ states("input_text.plex_default_show")}}", "episode.unwatched": true, "episode.inProgress": [true, false], "resume": 1, "sort": "addedAt:asc", "maxresults": 1 }'
- service: media_player.media_pause
entity_id: media_player.master_bedroom

View File

@@ -19,6 +19,9 @@ wake_on_lan:
homekit:
filter:
include_entities:
- person.georgi
- person.maya
# Living Room
- light.living_room
- light.living_room_main
@@ -28,10 +31,16 @@ homekit:
- climate.living_room_valve
- climate.toshiba_ac
- cover.living_room
- media_player.living_room
- scene.living_room_ambient_neon
- scene.living_room_ambient_default
- scene.living_room_ambient_christmas
- binary_sensor.multisensor_motion
- binary_sensor.living_room_presence
- sensor.multisensor_6_relative_humidity
- sensor.multisensor_6_temperature
- media_player.living_room_tv
- media_player.apple_tv
- media_player.nvidia_shield
# Bedroom
- light.master_bedroom
@@ -42,11 +51,8 @@ homekit:
- binary_sensor.bedroom_right_window_contact
- climate.bedroom_radiator_mode
- fan.philips_airpurifier
- media_player.master_bedroom
- sensor.bedroom_weather_humidity
- sensor.bedroom_weather_temperature
- sensor.purifier_air_quality
- sensor.purifier_allergens
# Kitchen
- light.kitchen
@@ -55,8 +61,6 @@ homekit:
- climate.kitchen_radiator_mode
- binary_sensor.kitchen_motion_occupancy
- binary_sensor.kitchen_window_contact
- input_number.brita_remaining_liters
- script.brita_pour_water
- sensor.kitchen_weather_humidity
- sensor.kitchen_weather_temperature
- vacuum.vacuum
@@ -75,6 +79,7 @@ homekit:
- light.hallway_main
- binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
- binary_sensor.front_door_contact
- group.hallway_motion
- sensor.hallway_weather_temperature
- sensor.hallway_weather_humidity
@@ -98,12 +103,6 @@ homekit:
linked_battery_sensor: sensor.multisensor_6_battery_level
low_battery_threshold: 20
name: Living Room Humidity
climate.living_room_radiator_mode:
linked_battery_sensor: sensor.living_room_radiator_battery_level
low_battery_threshold: 20
name: Living Room Radiator
switch.desk_outlet:
type: outlet
# Bedroom
light.master_bedroom_main:
@@ -140,11 +139,6 @@ homekit:
linked_battery_sensor: sensor.bedroom_radiator_battery_level
low_battery_threshold: 20
name: Bedroom Radiator
media_player.master_bedroom:
feature_list:
- feature: play_pause
- feature: play_stop
- feature: toggle_mute
# Kitchen
light.kitchen_main:

View File

@@ -35,7 +35,7 @@ script:
- service: script.toshiba_ac_on_cool_if_hot
- service: script.sonos_join_bedroom
- service: script.shield_screensaver
- service: script.tv_screensaver
- service: script.routine_coming_home_welcome_home
- service: script.turn_on_all_radiators

View File

@@ -25,7 +25,7 @@ script:
- light.living_room_ambient
- service: script.open_living_room_cover
- service: script.shield_screensaver
- service: script.tv_screensaver
# Only when no guests are present
- and: