mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-09 10:14:41 +00:00
Refactor packages - define automations per device where possible
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
# https://github.com/hristo-atanasov/Tasmota-IRHVAC/
|
||||
climate:
|
||||
- platform: tasmota_irhvac
|
||||
name: "TOSHIBA AC"
|
||||
command_topic: "cmnd/ir_blaster_1/irhvac"
|
||||
state_topic: "tele/ir_blaster_1/RESULT"
|
||||
temperature_sensor: sensor.multisensor_6_temperature
|
||||
protocol: "TOSHIBA_AC"
|
||||
max_temp: 30 #optional - default 32 int value
|
||||
min_temp: 17
|
||||
target_temp: 22 #optional - default 26 int value
|
||||
away_temp: 18 #optional - default 24 int value
|
||||
supported_modes:
|
||||
- "heat"
|
||||
- "cool"
|
||||
- "dry"
|
||||
- "auto"
|
||||
- "off"
|
||||
supported_fan_speeds:
|
||||
- "min"
|
||||
- "low"
|
||||
- "medium"
|
||||
- "high"
|
||||
- "max"
|
||||
- "auto"
|
||||
supported_swing_list:
|
||||
- "off"
|
||||
@@ -1,352 +0,0 @@
|
||||
# Philips Purifier
|
||||
# https://github.com/xMrVizzy/Philips-AirPurifier
|
||||
fan:
|
||||
platform: philips_airpurifier
|
||||
host: !secret philips_purifier_ip
|
||||
|
||||
input_select:
|
||||
purifier_speed:
|
||||
name: Speed
|
||||
icon: mdi:speedometer
|
||||
options:
|
||||
- Auto Mode
|
||||
- Allergen Mode
|
||||
- Sleep Mode
|
||||
- Speed 1
|
||||
- Speed 2
|
||||
- Speed 3
|
||||
- Turbo
|
||||
|
||||
purifier_target_humidity:
|
||||
name: Target humidity
|
||||
icon: mdi:water-percent
|
||||
options:
|
||||
- 40
|
||||
- 50
|
||||
- 60
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
purifier_air_quality:
|
||||
friendly_name: Air quality
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'pm25') }}"
|
||||
icon_template: mdi:weather-windy
|
||||
purifier_humidity:
|
||||
friendly_name: Humidity
|
||||
unit_of_measurement: "%"
|
||||
device_class: humidity
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'humidity') }}"
|
||||
icon_template: mdi:water
|
||||
purifier_temperature:
|
||||
friendly_name: Temperature
|
||||
unit_of_measurement: "°C"
|
||||
device_class: temperature
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'temperature') }}"
|
||||
icon_template: mdi:thermometer
|
||||
purifier_speed:
|
||||
friendly_name: Speed
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'speed') }}"
|
||||
icon_template: >-
|
||||
{% set value = state_attr('fan.philips_airpurifier', 'speed') %}
|
||||
{% if value == 'Auto Mode' %}
|
||||
{{ 'mdi:brightness-auto' }}
|
||||
{% elif value == 'Speed 1' %}
|
||||
{{ 'mdi:speedometer-slow' }}
|
||||
{% elif value == 'Speed 2' %}
|
||||
{{ 'mdi:speedometer-medium' }}
|
||||
{% elif value == 'Speed 3' %}
|
||||
{{ 'mdi:speedometer' }}
|
||||
{% elif value == 'Turbo' %}
|
||||
{{ 'mdi:car-turbocharger' }}
|
||||
{% elif value == 'Sleep Mode' %}
|
||||
{{ 'mdi:power-sleep' }}
|
||||
{% elif value == 'Allergen Mode' %}
|
||||
{{ 'mdi:allergy' }}
|
||||
{% endif %}
|
||||
purifier_allergens:
|
||||
friendly_name: Allergen index
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'allergen_index') }}"
|
||||
icon_template: mdi:weather-windy-variant
|
||||
purifier_function:
|
||||
friendly_name: Function
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'function') }}"
|
||||
icon_template: >-
|
||||
{% if state_attr('fan.philips_airpurifier', 'function') == 'Purification' %}
|
||||
{{ 'mdi:air-purifier' }}
|
||||
{% else %}
|
||||
{{ 'mdi:air-humidifier' }}
|
||||
{% endif %}
|
||||
purifier_pre_filter:
|
||||
friendly_name: Pre-filter
|
||||
unit_of_measurement: "Hrs"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'pre_filter') }}"
|
||||
icon_template: mdi:air-filter
|
||||
purifier_wick_filter:
|
||||
friendly_name: Wick filter
|
||||
unit_of_measurement: "Hrs"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'wick_filter') }}"
|
||||
icon_template: mdi:air-filter
|
||||
purifier_carbon_filter:
|
||||
friendly_name: Carbon filter
|
||||
unit_of_measurement: "Hrs"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'carbon_filter') }}"
|
||||
icon_template: mdi:air-filter
|
||||
purifier_hepa_filter:
|
||||
friendly_name: HEPA filter
|
||||
unit_of_measurement: "Hrs"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'hepa_filter')}}"
|
||||
icon_template: mdi:air-filter
|
||||
purifier_target_humidity:
|
||||
friendly_name: Target humidity
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'target_humidity') }}"
|
||||
icon_template: mdi:water-percent
|
||||
purifier_brightness:
|
||||
friendly_name: Brightness
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'light_brightness') }}"
|
||||
icon_template: mdi:brightness-6
|
||||
purifier_timer:
|
||||
friendly_name: Timer
|
||||
unit_of_measurement: "hrs"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'timer') }}"
|
||||
icon_template: mdi:timer
|
||||
purifier_time_remaining:
|
||||
friendly_name: Time remaining
|
||||
unit_of_measurement: "minutes"
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'timer_remaining_minutes') }}"
|
||||
icon_template: mdi:timer
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
purifier_out_of_water:
|
||||
friendly_name: Water level
|
||||
device_class: problem
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'water_level') == 0 }}"
|
||||
purifier_child_lock:
|
||||
friendly_name: Child lock
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'child_lock') }}"
|
||||
purifier_display_light:
|
||||
friendly_name: Display light
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'display_light') }}"
|
||||
purifier_filter_needs_change:
|
||||
friendly_name: Filter needs change
|
||||
device_class: problem
|
||||
value_template: >
|
||||
|
||||
{{ is_state('sensor.purifier_pre_filter', 0)
|
||||
or is_state('sensor.purifier_wick_filter', 0)
|
||||
or is_state('sensor.purifier_carbon_filter', 0)
|
||||
or is_state('sensor.purifier_hepa_filter', 0) }}
|
||||
|
||||
|
||||
script:
|
||||
purifier_toggle_function:
|
||||
alias: Purifier · Toggle function
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.purifier_out_of_water
|
||||
state: 'off'
|
||||
- service: philips_airpurifier.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data_template:
|
||||
function: >-
|
||||
{% if state_attr('fan.philips_airpurifier', 'function') == 'Purification' %}
|
||||
{{ 'Purification & Humidification' }}
|
||||
{% else %}
|
||||
{{ 'Purification' }}
|
||||
{% endif %}
|
||||
- service: script.purifier_request_update
|
||||
|
||||
purifier_request_update:
|
||||
alias: Purifier · Request update
|
||||
sequence:
|
||||
- service: homeassistant.update_entity
|
||||
entity_id: fan.philips_airpurifier
|
||||
|
||||
automation:
|
||||
- alias: Purifier · On start · Sync and update state
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: fan.philips_airpurifier
|
||||
to: 'on'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.purifier_target_humidity
|
||||
data_template:
|
||||
option: "{{ states('sensor.purifier_target_humidity') }}"
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.purifier_speed
|
||||
data_template:
|
||||
option: "{{ states('sensor.purifier_speed') }}"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.purifier_out_of_water
|
||||
state: "on"
|
||||
- service: philips_airpurifier.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data:
|
||||
function: 'Purification'
|
||||
|
||||
- alias: Purifier · Change speed
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.purifier_speed
|
||||
action:
|
||||
- service: fan.set_speed
|
||||
entity_id: fan.philips_airpurifier
|
||||
data_template:
|
||||
speed: "{{ states('input_select.purifier_speed') }}"
|
||||
- service: script.purifier_request_update
|
||||
|
||||
- alias: Purifier · Sync speed
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.purifier_speed
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.purifier_speed
|
||||
data_template:
|
||||
option: "{{ states('sensor.purifier_speed') }}"
|
||||
|
||||
- alias: Purifier · Change humidity
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.purifier_target_humidity
|
||||
action:
|
||||
- service: philips_airpurifier.set_target_humidity
|
||||
entity_id: fan.philips_airpurifier
|
||||
data_template:
|
||||
humidity: >-
|
||||
{% set state = states('input_select.purifier_target_humidity') | int %}
|
||||
{% if state == 40 %}
|
||||
40
|
||||
{% elif state == 50 %}
|
||||
50
|
||||
{% else %}
|
||||
60
|
||||
{% endif %}
|
||||
- service: script.purifier_request_update
|
||||
|
||||
- alias: Purifier · Sync humidity
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.purifier_target_humidity
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.purifier_target_humidity
|
||||
data_template:
|
||||
option: "{{ states('sensor.purifier_target_humidity') }}"
|
||||
- service: script.purifier_request_update
|
||||
|
||||
- alias: Purifier · Turn on · Low humidity
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.bedroom_weather_humidity
|
||||
below: 20
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.purifier_out_of_water
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: fan.philips_airpurifier
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_boolean.georgi_home
|
||||
state: "on"
|
||||
action:
|
||||
- service: fan.turn_on
|
||||
entity_id: fan.philips_airpurifier
|
||||
- service: philips_airpurifier.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data:
|
||||
function: "Purification & Humidification"
|
||||
- service: script.purifier_request_update
|
||||
- service: script.say
|
||||
data:
|
||||
message: "Hey, I'm turning on the purifier, because humidity is low and there is water in the tank"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate module · "
|
||||
message: "Purifier On · Humidity is low"
|
||||
domain: fan
|
||||
|
||||
- alias: Purifier · Turn on · Low air quality
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.purifier_air_quality
|
||||
above: 30
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.georgi_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: fan.philips_airpurifier
|
||||
state: "off"
|
||||
action:
|
||||
- service: fan.turn_on
|
||||
entity_id: fan.philips_airpurifier
|
||||
- service: script.say
|
||||
data:
|
||||
message: "Hey, I'm turning on the purifier, because air quality is low"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "Purifier On · Air quality is low"
|
||||
domain: fan
|
||||
- condition: state
|
||||
entity_id: binary_sensor.purifier_out_of_water
|
||||
state: "off"
|
||||
- service: philips_airpurifier.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data:
|
||||
funcition: "Purification & Humidification"
|
||||
- service: script.purifier_request_update
|
||||
- service: script.say
|
||||
data:
|
||||
message: "Also, switching to humidification, because there is water in the tank"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "Purifier Function · Switching to humidification - there is water in the tank"
|
||||
domain: fan
|
||||
|
||||
- alias: Purifier · Turn off · Okay humidity
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.bedroom_weather_humidity
|
||||
above: 55
|
||||
condition:
|
||||
condition: and
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: fan.philips_airpurifier
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: sensor.purifier_function
|
||||
state: "Purification & Humidification"
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.purifier_air_quality
|
||||
below: 30
|
||||
action:
|
||||
- service: fan.turn_off
|
||||
entity_id: fan.philips_airpurifier
|
||||
- service: script.purifier_request_update
|
||||
- service: script.say
|
||||
data:
|
||||
message: "Hey, I'm turning the purifier off, because humidity is okay"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "Purifier Off · Humidity is okay"
|
||||
domain: fan
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
fan.philips_airpurifier:
|
||||
friendly_name: Air purifier
|
||||
@@ -1,38 +0,0 @@
|
||||
automation:
|
||||
- alias: Lighting · Living Room · Toggle ceiling lights on desk switch single click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: single
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.living_room_ceiling
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Living Room · Toggle ambient lights on desk switch double click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: double
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.living_room_ambient
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
@@ -41,65 +41,3 @@ script:
|
||||
data:
|
||||
color_temp: 500
|
||||
brightness_pct: 20
|
||||
|
||||
automation:
|
||||
- alias: Lighting · Master bedroom · Toggle lights on bedside switch single click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret master_bedroom_bedside_switch_ieee
|
||||
command: single
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'day') %}
|
||||
light.master_bedroom_main
|
||||
{% elif is_state('input_select.house_mode', 'bed') %}
|
||||
light.bedside, light.bed_led
|
||||
{% elif is_state('input_select.house_mode', 'night') %}
|
||||
light.bed_led
|
||||
{% endif %}
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Master bedroom · Toggle lights on switch single click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret master_bedroom_switch_ieee
|
||||
command: single
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_main
|
||||
brightness_pct: >-
|
||||
|
||||
{% if is_state('input_select.house_mode', 'night') %}
|
||||
40
|
||||
{% else %}
|
||||
100
|
||||
{% endif %}
|
||||
|
||||
- alias: Lighting · Master bedroom · Toggle ambient lights on switch double click
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret master_bedroom_switch_ieee
|
||||
command: double
|
||||
action:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id:
|
||||
- light.bedside
|
||||
- light.bed_led
|
||||
brightness_pct: 100
|
||||
|
||||
@@ -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" }'
|
||||
@@ -1,64 +0,0 @@
|
||||
script:
|
||||
hdmi_switch_1:
|
||||
alias: HDMI Swtich · Set to 1
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE48B7" }'
|
||||
|
||||
hdmi_switch_2:
|
||||
alias: HDMI Swtich · Set to 2
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE58A7" }'
|
||||
|
||||
hdmi_switch_3:
|
||||
alias: HDMI Swtich · Set to 3
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE7887" }'
|
||||
|
||||
hdmi_switch_4:
|
||||
alias: HDMI Swtich · Set to 4
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE807F" }'
|
||||
|
||||
hdmi_switch_next:
|
||||
alias: HDMI Swtich · Next
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FEC03F" }'
|
||||
|
||||
hdmi_switch_pip:
|
||||
alias: HDMI Swtich · PIP
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE50AF" }'
|
||||
|
||||
hdmi_switch_sel:
|
||||
alias: HDMI Swtich · SEL
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FED827" }'
|
||||
|
||||
hdmi_switch_enter:
|
||||
alias: HDMI Swtich · Enter
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FEF807" }'
|
||||
@@ -20,26 +20,3 @@ script:
|
||||
entity_id: media_player.master_bedroom
|
||||
data_template:
|
||||
source: "{{ playlist | default('Evening Chill') }}"
|
||||
|
||||
automation:
|
||||
- alias: Music · Living Room · Play pause on desk switch hold
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret desk_switch_ieee
|
||||
command: hold
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Music · Master bedroom · Play pause on switch hold
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zha_event
|
||||
event_data:
|
||||
device_ieee: !secret master_bedroom_switch_ieee
|
||||
command: hold
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.master_bedroom
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
# https://www.home-assistant.io/integrations/webostv
|
||||
webostv:
|
||||
- host: !secret living_room_tv_ip
|
||||
name: Living Room TV
|
||||
turn_on_action:
|
||||
service: wake_on_lan.send_magic_packet
|
||||
data:
|
||||
mac: !secret living_room_tv_mac
|
||||
|
||||
media_player:
|
||||
- platform: androidtv
|
||||
name: nvidia shield
|
||||
host: !secret nvidia_shield_host
|
||||
|
||||
script:
|
||||
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 }}"
|
||||
|
||||
tv_fireplace:
|
||||
icon: mdi:fireplace
|
||||
alias: TV · Fireplace
|
||||
sequence:
|
||||
- service: script.tv_prepare_for_playback
|
||||
data:
|
||||
volume_level: 0.08
|
||||
- service: media_extractor.play_media
|
||||
entity_id: media_player.shield
|
||||
data:
|
||||
media_content_id: "https://www.youtube.com/watch?v=AWKzr6n0ea0"
|
||||
media_content_type: video/youtube
|
||||
|
||||
tv_bulsatcom_toggle:
|
||||
icon: mdi:remote-tv
|
||||
alias: TV · Bulsatcom toggle
|
||||
sequence:
|
||||
- service: script.bulsatcom_power
|
||||
- condition: state
|
||||
entity_id: media_player.living_room_tv
|
||||
state: "off"
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.living_room_tv
|
||||
- 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
|
||||
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: sonos.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
|
||||
|
||||
automation:
|
||||
- alias: TV · Join Beam to Sonos group when off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.living_room_tv
|
||||
to: "off"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_select.house_mode
|
||||
state: "day"
|
||||
action:
|
||||
- service: sonos.join
|
||||
data:
|
||||
master: media_player.master_bedroom
|
||||
entity_id: media_player.living_room
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sonos Group · TV off - joining Beam to Sonos Group"
|
||||
domain: media_player
|
||||
|
||||
- alias: TV · State · Sync on TV on
|
||||
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: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning Shield on - TV is on"
|
||||
domain: media_player
|
||||
|
||||
|
||||
- alias: TV · State · Sync on TV off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.living_room_tv
|
||||
to: "off"
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.nvidia_shield
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning Shield off - TV is off"
|
||||
domain: media_player
|
||||
|
||||
- alias: TV · State · Sync on Shield on
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.nvidia_shield
|
||||
from: "off"
|
||||
action:
|
||||
- service: media_player.turn_on
|
||||
entity_id: media_player.living_room_tv
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.living_room_tv
|
||||
data:
|
||||
source: "Shield"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning TV on - Shield is on"
|
||||
domain: media_player
|
||||
|
||||
|
||||
- alias: TV · State · Sync on Shield off
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.nvidia_shield
|
||||
to: "off"
|
||||
condition:
|
||||
condition: template
|
||||
value_template: "{{ is_state_attr('media_player.living_room_tv', 'source', 'Shield') }}"
|
||||
action:
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.living_room_tv
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "📺 Media Module · "
|
||||
message: "Sync TV state · Turning TV off - Shield is off"
|
||||
domain: media_player
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
media_player.living_room_tv:
|
||||
icon: mdi:television
|
||||
friendly_name: LG TV
|
||||
media_player.nvidia_shield:
|
||||
icon: mdi:set-top-box
|
||||
friendly_name: Nvidia Shield
|
||||
Reference in New Issue
Block a user