Big Update

This commit is contained in:
Philipp 2022-08-18 16:45:03 +02:00
parent 9f99de4509
commit 962b6fa4fe
20 changed files with 531 additions and 71 deletions

0
configuration.yaml Normal file → Executable file
View File

View File

@ -0,0 +1,97 @@
- type: 'custom:button-card'
template: card_title
name: TV
label: Control
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: 'custom:button-card'
color_type: icon
color: rgb(229,9,20)
icon: "mdi:netflix"
size: 20%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.netflix_and_chill
name: Netflix
- type: 'custom:button-card'
color_type: icon
color: rgb(30,215,96)
icon: "mdi:spotify"
size: 20%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_listen_music
name: Spotify
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: 'custom:button-card'
color_type: icon
#color: rgb(229,9,20)
icon: "mdi:nintendo-switch"
size: 20%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_play_switch
name: Nintendo Switch
- type: 'custom:button-card'
color_type: icon
color: rgb(51, 102, 255)
icon: "mdi:disc-player"
size: 20%
#tap_action:
# action: call-service
# service: script.turn_on
# service_data:
# entity_id: script.denon_listen_music
name: Blueray
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: 'custom:button-card'
color_type: icon
color: rgb(0,173,238)
icon: "mdi:steam"
size: 20%
# tap_action:
# action: call-service
# service: script.turn_on
# service_data:
# entity_id: script.netflix_and_chill
name: Steam Link
- type: 'custom:button-card'
color_type: icon
color: rgb(144,138,153)
icon: "mdi:gamepad-square"
size: 20%
#tap_action:
# action: call-service
# service: script.turn_on
# service_data:
# entity_id: script.denon_listen_music
name: Super NT
- type: 'custom:button-card'
color_type: icon
color: rgb(41, 61, 61)
icon: "mdi:television-off"
size: 10%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_tv_turn_off
name: Turn Off

View File

@ -0,0 +1,63 @@
- type: 'custom:button-card'
template: card_title
name: Volume
label: Control
- type: horizontal-stack
cards:
- type: 'custom:button-card'
icon: "mdi:volume-minus"
size: 20%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_volume_down
name: Down by 5
- type: 'custom:button-card'
color_type: icon
color: rgb(255,0,0)
icon: "mdi:volume-mute"
size: 20%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_volume_mute
name: Mute
- type: 'custom:button-card'
icon: "mdi:volume-plus"
size: 20%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_volume_up
name: Up by 5
- type: 'custom:button-card'
template: card_title
label: Presets
- type: horizontal-stack
cards:
- type: 'custom:button-card'
color_type: icon
icon: "mdi:television-classic"
size: 15%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_volume_video
name: TV Volume
- type: 'custom:button-card'
color_type: icon
icon: "mdi:bookmark-music-outline"
size: 15%
tap_action:
action: call-service
service: script.turn_on
service_data:
entity_id: script.denon_volume_music
name: Music Volume

View File

@ -11,10 +11,20 @@
name: LivingRoom
color: "blue"
entity_2:
entity_id: sensor.livingroom_temp_temperature
icon: "mdi:lightbulb" #OPTIONAL
name: Temp
entity_id: script.netflix_and_chill
icon: "mdi:netflix" #OPTIONAL
name: Netflix
color: "red"
entity_3:
entity_id: script.denon_listen_music
icon: "mdi:spotify" #OPTIONAL
name: Spotify
color: "green"
entity_4:
entity_id: script.denon_tv_turn_off
icon: "mdi:television-off" #OPTIONAL
name: TV OFF
color: "black"
- type: 'custom:button-card'
color_type: icon
@ -33,9 +43,6 @@
icon: mdi:mailbox-outline
label: No Mail
- type: horizontal-stack
cards:
- type: "custom:button-card"

View File

@ -16,15 +16,6 @@ automation:
data:
message: reicht auch mit dem lüften!
title: Badezimmer
#- service: notify.mobile_app_tonis_iphone
# data:
# message: reicht auch mit dem lüften!
# title: Badezimmer
- service: persistent_notification.create
data:
message: "Your message goes here"
title: "Custom subject"
notification_id: 1
#freezer open for 5 min
- alias: livingroom_freezer_opened
trigger:
@ -32,17 +23,13 @@ automation:
domain: binary_sensor
type: opened
platform: device
entity_id: binary_sensor.bathroom_window_iaszone
entity_id: binary_sensor.livingroom_freezer_iaszone
for:
hours: 0
minutes: 5
seconds: 0
action:
- service: notify.mobile_app_sm_g998b
data:
message: ist noch offen!
title: Freezer
- service: notify.mobile_app_tonis_iphone
- service: notify.notify
data:
message: ist noch offen!
title: Freezer

56
packages/harmony/harmony.yaml Executable file
View File

@ -0,0 +1,56 @@
script:
denon_listen_music:
sequence:
- service: media_player.turn_on
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
- service: media_player.select_source
data:
source: HEOS Music
target:
entity_id: media_player.denon_avr_x1600h
- service: media_player.volume_set
data:
volume_level: 0.3
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
- service: remote.send_command
target:
device_id: 13079d62ad53d8991b26238c5594adca
data:
device: "75263914"
command: Play
denon_play_switch:
sequence:
- service: script.turn_on
target:
entity_id: script.tv_turn_on
- service: media_player.turn_on
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
- delay:
seconds: 5
- service: media_player.select_source
data:
source: HEOS Music
target:
entity_id: media_player.denon_avr_x1600h
- service: remote.send_command
target:
device_id: 13079d62ad53d8991b26238c5594adca
data:
device: "78200006"
command: InputHdmi1
denon_tv_turn_off:
sequence:
- service: media_player.turn_off
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
- service: light.turn_off
target:
entity_id: light.livingroom_switch_tv

44
packages/harmony/netflix.yaml Executable file
View File

@ -0,0 +1,44 @@
script:
netflix_and_chill:
sequence:
- choose:
- conditions:
- condition: device
type: is_off
device_id: 53acbc86deb1bb16ca4c0889a78be5d2
entity_id: light.livingroom_switch_tv
domain: light
sequence:
- service: script.turn_on
target:
entity_id: script.tv_turn_on
- service: script.turn_on
target:
entity_id: script.denon_watch_firetv
default:
- service: script.turn_on
target:
entity_id: script.denon_watch_firetv
mode: single
denon_watch_firetv:
sequence:
- service: remote.send_command
target:
device_id: 13079d62ad53d8991b26238c5594adca
data:
device: "78200006"
command: InputHdmi2
- service: media_player.turn_on
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
- service: media_player.select_source
data:
source: Fire TV Stick
target:
entity_id: media_player.denon_avr_x1600h
- service: media_player.volume_set
data:
volume_level: 0.5
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6

View File

@ -0,0 +1,14 @@
script:
tv_turn_on:
sequence:
- service: light.turn_on
target:
entity_id: light.livingroom_switch_tv
- delay:
seconds: 5
- service: remote.send_command
target:
device_id: 13079d62ad53d8991b26238c5594adca
data:
device: "78200006"
command: PowerOn

View File

@ -0,0 +1,53 @@
script:
denon_volume_up:
sequence:
- service: media_player.volume_set
entity_id: media_player.denon_avr_x1600h
data_template:
volume_level: "{{ state_attr('media_player.denon_avr_x1600h', 'volume_level') | float + 0.05 }}"
denon_volume_down:
sequence:
- service: media_player.volume_set
entity_id: media_player.denon_avr_x1600h
data_template:
volume_level: "{{ state_attr('media_player.denon_avr_x1600h', 'volume_level') | float - 0.05 }}"
denon_volume_video:
sequence:
- service: media_player.volume_set
data:
volume_level: 0.5
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
denon_volume_music:
sequence:
- service: media_player.volume_set
data:
volume_level: 0.35
target:
device_id: 5ec213f0aedf10ff7fdff1d05ae6ead6
denon_volume_mute:
variables:
entity_id: media_player.denon_avr_x1600h
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ state_attr(entity_id, ''is_volume_muted'')
== false }}'
sequence:
- service: media_player.volume_mute
data:
is_volume_muted: true
target:
entity_id: '{{ entity_id }}'
default:
- service: media_player.volume_mute
target:
entity_id: '{{ entity_id }}'
data:
is_volume_muted: false
mode: single

View File

@ -1,6 +1,8 @@
adaptive_lighting:
min_brightness: 35
initial_transition: 0
transition: 0
interval: 20
lights:
- light.office_bulb
- light.bedroom_bulb_light

View File

@ -0,0 +1,9 @@
# Example configuration.yaml entry
light:
- platform: group
name: "All Lights"
entities:
- light.bedroom_bulb_light
- light.livingroom_switch_tv
- light.office_bulb
- light.office_switch_socket

View File

@ -26,7 +26,7 @@ automation:
entity_id: light.bedroom_bulb_light
domain: light
# Office Button Light
- alias: office_light_button
- alias: office_light_button_single_press
trigger:
- device_id: ab68a51751fcc28c6576ba467a77581d
domain: zha
@ -38,3 +38,19 @@ automation:
device_id: ce016fbf6d9602740bbabe1fe9915c88
entity_id: light.office_bulb
domain: light
# Office Button Light double press
- alias: office_light_button_double_press
trigger:
- device_id: ab68a51751fcc28c6576ba467a77581d
domain: zha
platform: device
type: remote_button_double_press
subtype: button
action:
- service: light.turn_on
target:
entity_id: light.office_bulb
data:
color_temp: 255
brightness: 255

View File

@ -1,16 +0,0 @@
#script:
# - name: Living Room Lights
# icon: "mdi:flower-tulip"
# entities:
# light.livingroom_switch_lamp_table: "toggle"
# light.livingroom_switch_lamp_couch: "toggle"
# light.living_room_switch_lamp_sill: "toggle"
# Example configuration.yaml entry
light:
- platform: group
name: "Living Room Lights"
entities:
- light.livingroom_switch_lamp_table
- light.livingroom_switch_lamp_couch
- light.living_room_switch_lamp_sill

View File

@ -0,0 +1,8 @@
# Example configuration.yaml entry
light:
- platform: group
name: "Living Room Lights"
entities:
- light.livingroom_switch_lamp_table
- light.livingroom_switch_lamp_couch
- light.living_room_switch_lamp_sill

View File

@ -23,16 +23,13 @@ automation:
entity_id: switch.mailbox
- service: scene.create
data:
scene_id: before
snapshot_entities:
- light.office_bulb
- delay:
seconds: 2
- service: scene.create
data:
scene_id: after
snapshot_entities:
- switch.adaptive_lighting_default
- light.office_bulb
- switch.adaptive_lighting_default
scene_id: livingroom_office_bulb_state
- service: automation.turn_off
target:
entity_id: automation.light_save_last_state
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_default
@ -40,14 +37,18 @@ automation:
target:
entity_id: light.office_bulb
data:
color_name: blue
rgb_color: [0,0,255]
- delay:
seconds: 15
- service: scene.turn_on
target:
entity_id: scene.before
entity_id: scene.last_on_state
- delay:
seconds: 1
seconds: 0
milliseconds: 500
- service: scene.turn_on
target:
entity_id: scene.after
entity_id: scene.livingroom_office_bulb_state
- service: automation.turn_on
target:
entity_id: automation.light_save_last_state

View File

@ -17,20 +17,16 @@ automation:
entity_id: switch.mailbox
- service: scene.create
data:
scene_id: before
snapshot_entities:
- light.office_bulb
- automation.mailbox_mail_received
- light.office_bulb
- switch.adaptive_lighting_default
scene_id: livingroom_office_bulb_state
- service: automation.turn_off
target:
entity_id: automation.light_save_last_state
- service: automation.turn_off
target:
entity_id: automation.mailbox_mail_received
- service: scene.create
data:
scene_id: after
snapshot_entities:
- switch.adaptive_lighting_default
- delay:
seconds: 2
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_default
@ -38,14 +34,21 @@ automation:
target:
entity_id: light.office_bulb
data:
color_name: red
rgb_color: [0,0,255]
- delay:
seconds: 15
- service: scene.turn_on
target:
entity_id: scene.before
entity_id: scene.last_on_state
- delay:
seconds: 1
seconds: 0
milliseconds: 500
- service: scene.turn_on
target:
entity_id: scene.after
entity_id: scene.livingroom_office_bulb_state
- service: automation.turn_on
target:
entity_id: automation.light_save_last_state
- service: automation.turn_on
target:
entity_id: automation.mailbox_mail_received

View File

@ -17,3 +17,21 @@ switch:
{% else %}
mdi:mailbox-outline
{% endif %}
automation:
- alias: light_save_last_state
mode: single
trigger:
- platform: time_pattern
seconds: "10"
condition:
- condition: state
entity_id: light.office_bulb
state: "on"
action:
- service: scene.create
data:
snapshot_entities:
- light.office_bulb
- switch.adaptive_lighting_default
scene_id: last_on_state

View File

@ -1,3 +1,10 @@
wake_on_lan:
switch:
- platform: wake_on_lan
mac: !secret tower_mac
name: tower
#Office Steckdosenleiste
automation:
- alias: office_light_socket
@ -12,3 +19,8 @@ automation:
device_id: 343b205f3ed48a715e59c5490050150f
entity_id: light.office_switch_socket
domain: light
- delay:
seconds: 15
- service: switch.turn_on
target:
entity_id: switch.tower

View File

@ -0,0 +1,73 @@
# automation:
# - alias: turn_off_everything
# mode: single
# trigger:
# - platform: time
# at: "02:00:00"
# action:
# # inside a automation actions or script sequence
# - alias: "Set up variables for the actions"
# variables:
# # Including an id in the action allows us to identify this script run
# # and not accidentally trigger for other notification actions
# action_turn_off: "{{ 'OFF_' ~ context.id }}"
# action_turn_off_later: "{{ 'LATER_' ~ context.id }}"
# - alias: "Ask to turn off everything"
# service: notify.mobile_app_sm_g998b
# data:
# message: "Do you want to turn off the lights"
# data:
# actions:
# - action: "{{ action_turn_off }}"
# title: Turn off
# - action: "{{ action_turn_off_later }}"
# title: Turn off later
# - alias: "Wait for a response"
# wait_for_trigger:
# - platform: event
# event_type: mobile_app_notification_action
# event_data:
# # waiting for the specific action avoids accidentally continuing
# # for another script/automation's notification action
# action: "{{ action_turn_off }}"
# - platform: event
# event_type: mobile_app_notification_action
# event_data:
# action: "{{ action_turn_off_later }}"
# - alias: "Perform the action"
# choose:
# - conditions: "{{ wait.trigger.event.data.action == action_turn_off }}"
# sequence:
# - service: homeassistant.turn_off
# target:
# entity_id: light.living_room_lights
# #- service: homeassistant.turn_off
# # target:
# # entity_id: light.all_lights
# - conditions: "{{ wait.trigger.event.data.action == action_turn_off_later }}"
# sequence:
# - service: cover.close_cover
# target:
# entity_id: cover.some_cover
# - alias: turn_off_everything
# trigger:
# - platform: time
# at: "15:00:00"
# action:
# - service: notify.mobile_app_sm_g998b
# data:
# message: "Something happened at home!"
# data:
# actions:
# - action: "REPLY"
# title: "Sound Alarm"
# - action: "URI"
# title: "Open Url"
# uri: "https://google.com"

View File

@ -26,8 +26,21 @@ views:
cards:
!include lovelace/dashboard/sensors.yaml
- type: custom:vertical-layout
title: "Kunibert"
title: "TV Remote"
path: 1
cards:
- type: custom:vertical-layout
type: vertical-stack
cards:
!include lovelace/dashboard/harmony/harmony.yaml
- type: custom:layout-break
- type: custom:vertical-layout
type: vertical-stack
cards:
!include lovelace/dashboard/harmony/volume_control.yaml
- type: custom:vertical-layout
title: "Kunibert"
path: 2
cards:
- type: custom:vertical-layout
type: vertical-stack