mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-21 10:57:43 +00:00
Move config out of subfolder
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
input_number:
|
||||
bathroom_high_volume:
|
||||
name: Bathroom high volume
|
||||
min: 0
|
||||
max: 1
|
||||
step: 0.05
|
||||
icon: mdi:speaker
|
||||
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Bathroom switch battery"
|
||||
state_topic: "z2m_deconz/bathroom_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- name: "Bathroom switch LQI"
|
||||
state_topic: "z2m_deconz/bathroom_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
device_class: "signal_strength"
|
||||
unit_of_measurement: "lqi"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
- alias: Bathroom · Switch
|
||||
use_blueprint:
|
||||
path: aqara_switch.yaml
|
||||
input:
|
||||
z2m_topic: "z2m_deconz/bathroom_switch"
|
||||
click:
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.bathroom
|
||||
data_template:
|
||||
volume_level: >-
|
||||
{% if state_attr('media_player.bathroom', 'volume_level')|float > (states('input_number.bathroom_high_volume')|float - 0.05) %}
|
||||
0.25
|
||||
{% else %}
|
||||
{{ states('input_number.bathroom_high_volume')|float }}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,96 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Bedroom Opple action"
|
||||
state_topic: "z2m_deconz/opple_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:gesture-double-tap"
|
||||
value_template: "{{ value_json.action }}"
|
||||
- name: "Bedroom Opple battery"
|
||||
state_topic: "z2m_deconz/opple_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- name: "Bedroom Opple LQI"
|
||||
state_topic: "z2m_deconz/opple_1"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "lqi"
|
||||
device_class: "signal_strength"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
- alias: Bedroom · Opple
|
||||
use_blueprint:
|
||||
path: oppo_6_btn_switch.yaml
|
||||
input:
|
||||
opple_z2m_name: "z2m_deconz/opple_1"
|
||||
action_sensor: sensor.bedroom_opple_action
|
||||
|
||||
button_1_single:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom
|
||||
|
||||
button_2_single:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id:
|
||||
- light.master_bedroom
|
||||
brightness_pct: >-
|
||||
{% if not is_state('input_select.bedroom_mode', 'day') %} 40 {% else %} 100 {% endif %}
|
||||
|
||||
button_1_double:
|
||||
- service: light.turn_off
|
||||
entity_id: light.master_bedroom_main
|
||||
|
||||
button_2_double:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: light.master_bedroom_main
|
||||
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'day') | iif(100, 40) }}"
|
||||
|
||||
button_1_triple:
|
||||
- service: light.turn_off
|
||||
entity_id:
|
||||
- light.bedside
|
||||
|
||||
button_2_triple:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id:
|
||||
- light.bedside
|
||||
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'day') | iif(100, 40) }}"
|
||||
|
||||
button_3_single:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.master_bedroom
|
||||
|
||||
button_3_double:
|
||||
- service: script.sonos_join_tv
|
||||
|
||||
button_3_triple:
|
||||
- service: script.sonos_join_bedroom
|
||||
|
||||
button_3_release:
|
||||
- service: media_player.play_next
|
||||
entity_id: media_player.master_bedroom
|
||||
|
||||
button_4_single:
|
||||
- service: script.music_play
|
||||
|
||||
button_4_double:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Starred'
|
||||
|
||||
button_4_triple:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Retro'
|
||||
|
||||
button_5_single:
|
||||
- service: fan.turn_off
|
||||
entity_id: fan.philips_airpurifier
|
||||
|
||||
button_6_single:
|
||||
- service: fan.turn_on
|
||||
entity_id: fan.philips_airpurifier
|
||||
@@ -0,0 +1,38 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Bedside switch battery"
|
||||
state_topic: "z2m_deconz/bedside_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- name: "Bedside switch LQI"
|
||||
state_topic: "z2m_deconz/bedside_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "lqi"
|
||||
device_class: "signal_strength"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
- alias: Bedroom · Bedside Switch
|
||||
use_blueprint:
|
||||
path: aqara_switch.yaml
|
||||
input:
|
||||
z2m_topic: "z2m_deconz/bedside_switch"
|
||||
click:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: >-
|
||||
{% if is_state('input_select.bedroom_mode', 'day') %}
|
||||
light.master_bedroom_main
|
||||
{% else %}
|
||||
light.bedside
|
||||
{% endif %}
|
||||
brightness_pct: 100
|
||||
|
||||
double_click:
|
||||
- service: light.toggle
|
||||
entity_id: light.bedside
|
||||
|
||||
hold:
|
||||
- service: script.toggle_bedroom_mode
|
||||
@@ -0,0 +1,39 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Bedside second switch battery"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- name: "Bedside second switch LQI"
|
||||
state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "lqi"
|
||||
device_class: "signal_strength"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
|
||||
automation:
|
||||
- alias: Bedroom · Bedside Second Switch
|
||||
use_blueprint:
|
||||
path: aqara_switch.yaml
|
||||
input:
|
||||
z2m_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
click:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: >-
|
||||
{% if is_state('input_select.bedroom_mode', 'day') %}
|
||||
['light.master_bedroom_main', 'light.bedside']
|
||||
{% else %}
|
||||
light.bedside
|
||||
{% endif %}
|
||||
brightness_pct: 100
|
||||
|
||||
double_click:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.master_bedroom
|
||||
|
||||
hold:
|
||||
- service: script.toggle_bedroom_mode
|
||||
@@ -0,0 +1,385 @@
|
||||
fan:
|
||||
- platform: philips_airpurifier_http
|
||||
host: !secret philips_purifier_ip
|
||||
|
||||
input_boolean:
|
||||
purifier_turned_on_for_bad_air:
|
||||
name: Purifier enabled for bad air
|
||||
|
||||
input_select:
|
||||
purifier_preset_mode:
|
||||
name: mode
|
||||
icon: mdi:speedometer
|
||||
options:
|
||||
- auto
|
||||
- manual
|
||||
- sleep
|
||||
- allergen
|
||||
|
||||
purifier_speed:
|
||||
name: speed
|
||||
icon: mdi:speedometer
|
||||
options:
|
||||
- 0
|
||||
- 20
|
||||
- 40
|
||||
- 60
|
||||
- 80
|
||||
- 100
|
||||
|
||||
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_preset_mode:
|
||||
friendly_name: Preset Mode
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'preset_mode') }}"
|
||||
icon_template: >-
|
||||
{% set value = state_attr('fan.philips_airpurifier', 'preset_mode') %}
|
||||
{% if value == 'auto' %}
|
||||
{{ 'mdi:brightness-auto' }}
|
||||
{% elif value == 'manual' %}
|
||||
{{ 'mdi:speedometer-medium' }}
|
||||
{% elif value == 'sleep' %}
|
||||
{{ 'mdi:power-sleep' }}
|
||||
{% elif value == 'allergen' %}
|
||||
{{ 'mdi:allergy' }}
|
||||
{% endif %}
|
||||
purifier_speed:
|
||||
friendly_name: Speed
|
||||
value_template: "{{ state_attr('fan.philips_airpurifier', 'percentage') }}"
|
||||
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: >-
|
||||
{{ is_state_attr('fan.philips_airpurifier', 'function', 'Purification') | iif('mdi:air-purifier', 'mdi:air-humidifier') }}
|
||||
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-outline
|
||||
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-outline
|
||||
|
||||
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_http.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data_template:
|
||||
function: >-
|
||||
{{ state_attr('fan.philips_airpurifier', 'function') == 'Purification' | iif('Purification & Humidification', 'Purification') }}
|
||||
|
||||
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_http.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data:
|
||||
function: 'Purification'
|
||||
|
||||
- alias: Purifier · Change preset mode
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.purifier_preset_mode
|
||||
action:
|
||||
- service: fan.set_preset_mode
|
||||
entity_id: fan.philips_airpurifier
|
||||
data_template:
|
||||
preset_mode: "{{ states('input_select.purifier_preset_mode') }}"
|
||||
|
||||
- alias: Purifier · Sync preset mode
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: sensor.purifier_preset_mode
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.purifier_preset_mode
|
||||
data_template:
|
||||
option: "{{ states('sensor.purifier_preset_mode') }}"
|
||||
|
||||
- alias: Purifier · Change speed
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.purifier_speed
|
||||
action:
|
||||
- service: fan.set_percentage
|
||||
entity_id: fan.philips_airpurifier
|
||||
data_template:
|
||||
percentage: "{{ states('input_select.purifier_speed') }}"
|
||||
|
||||
- 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_http.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 %}
|
||||
|
||||
- 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') }}"
|
||||
|
||||
- alias: Purifier · Turn on · Low humidity
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.bedroom_weather_humidity
|
||||
below: 20
|
||||
condition:
|
||||
and:
|
||||
- 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.someone_home
|
||||
state: "on"
|
||||
action:
|
||||
- service: fan.turn_on
|
||||
entity_id: fan.philips_airpurifier
|
||||
- service: philips_airpurifier_http.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data:
|
||||
function: "Purification & Humidification"
|
||||
- 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:
|
||||
and:
|
||||
- condition: state
|
||||
entity_id: input_boolean.someone_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: fan.philips_airpurifier
|
||||
state: "off"
|
||||
action:
|
||||
- service: fan.turn_on
|
||||
entity_id: fan.philips_airpurifier
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.purifier_turned_on_for_bad_air
|
||||
- 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_http.set_function
|
||||
entity_id: fan.philips_airpurifier
|
||||
data:
|
||||
function: "Purification & Humidification"
|
||||
- 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:
|
||||
and:
|
||||
- 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.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
|
||||
|
||||
- alias: Purifier · Turn off · Air quality returned to normal
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.purifier_air_quality
|
||||
below: 20
|
||||
condition:
|
||||
and:
|
||||
- condition: state
|
||||
entity_id: fan.philips_airpurifier
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.purifier_turned_on_for_bad_air
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: group.bedroom_windows
|
||||
state: "off"
|
||||
|
||||
action:
|
||||
- service: fan.turn_off
|
||||
entity_id: fan.philips_airpurifier
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.purifier_turned_on_for_bad_air
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "Purifier Off · Air quality returned to normal"
|
||||
domain: fan
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
fan.philips_airpurifier:
|
||||
friendly_name: Air purifier
|
||||
@@ -0,0 +1,46 @@
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
tapo_bedroom:
|
||||
friendly_name: "Bedroom Camera"
|
||||
value_template: "{{ is_state('switch.bedroom_privacy', 'off') }}"
|
||||
turn_on:
|
||||
service: script.tapo_bedroom_on
|
||||
turn_off:
|
||||
service: script.tapo_bedroom_off
|
||||
icon_template: >
|
||||
{%if is_state('switch.bedroom_privacy', 'off') %}
|
||||
mdi:video
|
||||
{% else %}
|
||||
mdi:video-off
|
||||
{% endif %}
|
||||
|
||||
script:
|
||||
tapo_bedroom_toggle:
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions: "{{ is_state('switch.bedroom_privacy', 'on') }}"
|
||||
sequence:
|
||||
- service: script.tapo_bedroom_off
|
||||
|
||||
default:
|
||||
- service: script.tapo_bedroom_on
|
||||
|
||||
tapo_bedroom_on:
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.bedroom_privacy
|
||||
- service: select.select_option
|
||||
entity_id: select.bedroom_move_to_preset
|
||||
data:
|
||||
option: away
|
||||
|
||||
|
||||
tapo_bedroom_off:
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
entity_id: select.bedroom_move_to_preset
|
||||
data:
|
||||
option: home
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.bedroom_privacy
|
||||
@@ -0,0 +1,53 @@
|
||||
#############################
|
||||
# Moved to bedside_switch_2 #
|
||||
#############################
|
||||
|
||||
# mqtt:
|
||||
# sensor:
|
||||
# - name: "Bedroom wall switch battery"
|
||||
# state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
# availability_topic: "z2m_deconz/bridge/state"
|
||||
# unit_of_measurement: "%"
|
||||
# device_class: "battery"
|
||||
# value_template: "{{ value_json.battery }}"
|
||||
# - name: "Bedroom wall switch LQI"
|
||||
# state_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
# availability_topic: "z2m_deconz/bridge/state"
|
||||
# unit_of_measurement: "lqi"
|
||||
# device_class: "signal_strength"
|
||||
# value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
|
||||
# automation:
|
||||
# - alias: Guest Bedroom · Aqara Switch
|
||||
# use_blueprint:
|
||||
# path: aqara_switch.yaml
|
||||
# input:
|
||||
# z2m_topic: "z2m_deconz/bedroom_wall_switch"
|
||||
# click:
|
||||
# - choose:
|
||||
# - conditions:
|
||||
# - condition: state
|
||||
# entity_id: input_select.guest_bedroom_mode
|
||||
# state: 'night'
|
||||
# sequence:
|
||||
# - service: light.toggle
|
||||
# entity_id: light.light_lohas_6
|
||||
# data_template:
|
||||
# brightness_pct: 10
|
||||
# color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}"
|
||||
# default:
|
||||
# - service: light.toggle
|
||||
# entity_id: light.light_lohas_6
|
||||
# data_template:
|
||||
# brightness_pct: 100
|
||||
# color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}"
|
||||
|
||||
# double_click:
|
||||
# - service: light.toggle
|
||||
# entity_id: light.light_lohas_6
|
||||
|
||||
# hold:
|
||||
# - service: script.guest_bedroom_bedside_confirm
|
||||
# - service: input_select.select_next
|
||||
# entity_id: input_select.guest_bedroom_mode
|
||||
@@ -0,0 +1,49 @@
|
||||
input_select:
|
||||
hallway_dashboard_mode:
|
||||
name: Hallway dashboard mode
|
||||
icon: mdi:tablet-dashboard
|
||||
options:
|
||||
- "Home"
|
||||
- "Leaving"
|
||||
- "Coming Home"
|
||||
|
||||
automation:
|
||||
- alias: "Hallway tablet · Set to home after 10 minutes"
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.someone_home
|
||||
to: "on"
|
||||
for:
|
||||
minutes: 10
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
entity_id: input_select.hallway_dashboard_mode
|
||||
data:
|
||||
option: "Home"
|
||||
|
||||
- alias: Hallway tablet · Leaving · Goodbye after door opened
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: input_select.hallway_dashboard_mode
|
||||
to: "Leaving"
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: input_boolean.guest_bedroom
|
||||
state: "off"
|
||||
action:
|
||||
- service: script.say
|
||||
data:
|
||||
message: "Waiting for front door to open. Have a great time!"
|
||||
- wait_for_trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.front_door
|
||||
to: "on"
|
||||
timeout:
|
||||
minutes: 5
|
||||
continue_on_timeout: false
|
||||
- service: script.say
|
||||
data:
|
||||
message: "Goodbye!"
|
||||
# TODO: add conditions
|
||||
# - service: input_boolean.turn_off
|
||||
# entity_id: input_boolean.georgi_home
|
||||
@@ -0,0 +1,54 @@
|
||||
input_number:
|
||||
brita_remaining_liters:
|
||||
name: Remaining liters
|
||||
unit_of_measurement: "liters"
|
||||
mode: box
|
||||
min: 0
|
||||
max: 150
|
||||
step: 0.5
|
||||
icon: mdi:water
|
||||
|
||||
input_datetime:
|
||||
brita_next_change:
|
||||
name: Filter next change
|
||||
has_date: true
|
||||
has_time: false
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
brita_should_change_filter:
|
||||
friendly_name: Should change Brita filter
|
||||
device_class: problem
|
||||
value_template: >-
|
||||
|
||||
{% set liters_check = states('input_number.brita_remaining_liters')|int < 3 %}
|
||||
|
||||
{% set next_change = states('input_datetime.brita_next_change') %}
|
||||
{% set time_delta = (as_timestamp(next_change) - as_timestamp(now())) %}
|
||||
{% set date_check = time_delta / (3600*24) | round(0) < 3 %}
|
||||
|
||||
{{ liters_check or date_check }}
|
||||
|
||||
script:
|
||||
brita_pour_water:
|
||||
alias: Brita · Pour water
|
||||
icon: mdi:cup-water
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
entity_id: input_number.brita_remaining_liters
|
||||
data_template:
|
||||
value: "{{ states('input_number.brita_remaining_liters') | float - 1 }}"
|
||||
|
||||
brita_new_filter:
|
||||
alias: Brita · New filter
|
||||
icon: mdi:filter-plus-outline
|
||||
sequence:
|
||||
- service: input_number.set_value
|
||||
entity_id: input_number.brita_remaining_liters
|
||||
data:
|
||||
value: 150
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.brita_next_change
|
||||
data_template:
|
||||
date: "{{ (as_timestamp(now()) + 3600*24*60) | timestamp_custom('%Y-%m-%d') }}"
|
||||
@@ -0,0 +1,192 @@
|
||||
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" }'
|
||||
@@ -0,0 +1,227 @@
|
||||
binary_sensor:
|
||||
- platform: ping
|
||||
host: !secret cadmium_ip
|
||||
name: cadmium_ping
|
||||
scan_interval: 10
|
||||
count: 2
|
||||
|
||||
- platform: template
|
||||
sensors:
|
||||
cadmium:
|
||||
friendly_name: Cadmium
|
||||
value_template: >-
|
||||
{{ is_state("binary_sensor.cadmium_ping", "on") }}
|
||||
icon_template: >-
|
||||
{{ is_state("binary_sensor.cadmium_ping", "on") | iif(' mdi:desktop-mac-dashboard', 'mdi:desktop-mac') }}
|
||||
|
||||
#
|
||||
# ─── IOTLink ──────────────────────────────────────────────────────────────
|
||||
#
|
||||
|
||||
mqtt:
|
||||
# binary_sensor:
|
||||
# - name: "Cadmium playing"
|
||||
# availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
# payload_available: "ON"
|
||||
# payload_not_available: "OFF"
|
||||
# payload_on: "True"
|
||||
# payload_off: "False"
|
||||
# state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/media/playing"
|
||||
|
||||
sensor:
|
||||
- name: "Cadmium uptime"
|
||||
icon: mdi:clock-check
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/system/uptime"
|
||||
|
||||
- name: "Cadmium idle time"
|
||||
icon: mdi:clock-alert
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/system/idle-time"
|
||||
value_template: "{{ value | multiply(1/60) | round(0) }}"
|
||||
unit_of_measurement: "minutes"
|
||||
|
||||
# CPU
|
||||
- name: "Cadmium CPU usage"
|
||||
icon: mdi:chip
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/cpu/usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
|
||||
# Memory
|
||||
- name: "Cadmium memory used"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/used"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
- name: "Cadmium memory used percent"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
- name: "Cadmium memory available"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/available"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
- name: "Cadmium memory total"
|
||||
icon: mdi:memory
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/memory/total"
|
||||
unit_of_measurement: "MB"
|
||||
|
||||
# C Drive
|
||||
- name: "Cadmium C usage"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/drive-usage"
|
||||
unit_of_measurement: "%"
|
||||
|
||||
- name: "Cadmium C free space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/total-free-space"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
- name: "Cadmium C used space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/used-space"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
- name: "Cadmium C total space"
|
||||
icon: mdi:harddisk
|
||||
availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
payload_available: "ON"
|
||||
payload_not_available: "OFF"
|
||||
state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/hard-drive/c/total-size"
|
||||
unit_of_measurement: "GB"
|
||||
|
||||
|
||||
# # Media
|
||||
# - name: "Cadmium volume"
|
||||
# icon: mdi:volume-medium
|
||||
# availability_topic: "iotlink/workgroup/cadmium/lwt"
|
||||
# payload_available: "ON"
|
||||
# payload_not_available: "OFF"
|
||||
# state_topic: "iotlink/workgroup/cadmium/windows-monitor/stats/media/volume"
|
||||
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
cadmium:
|
||||
friendly_name: Cadmium
|
||||
value_template: "{{ is_state('binary_sensor.cadmium', 'on') }}"
|
||||
turn_on:
|
||||
service: script.cadmium_start
|
||||
turn_off:
|
||||
service: script.cadmium_shutdown
|
||||
icon_template: >-
|
||||
{{ is_state('binary_sensor.cadmium', 'on') | iif('mdi:monitor-dashboard', 'mdi:monitor-off') }}
|
||||
|
||||
script:
|
||||
cadmium_start:
|
||||
alias: Cadmium · Start
|
||||
icon: mdi:play-box-outline
|
||||
sequence:
|
||||
- service: wake_on_lan.send_magic_packet
|
||||
data:
|
||||
mac: !secret cadmium_mac
|
||||
|
||||
cadmium_shutdown:
|
||||
alias: Cadmium · Shutdown
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/shutdown"
|
||||
payload: ""
|
||||
|
||||
cadmium_lock:
|
||||
alias: Cadmium · Lock
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/lock"
|
||||
payload: ""
|
||||
|
||||
# cadmium_vol_mute:
|
||||
# alias: Cadmium · Toggle Mute
|
||||
# sequence:
|
||||
# - service: mqtt.publish
|
||||
# data:
|
||||
# topic: "iotlink/workgroup/cadmium/commands/volume/mute"
|
||||
# payload: ""
|
||||
|
||||
# cadmium_set_volume:
|
||||
# alias: Cadmium · Set volume
|
||||
# sequence:
|
||||
# - service: mqtt.publish
|
||||
# data_template:
|
||||
# topic: "iotlink/workgroup/cadmium/commands/volume/set"
|
||||
# payload: "{{ volume | default(30) }}"
|
||||
|
||||
cadmium_displays_on:
|
||||
alias: Cadmium · Displays ON
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/displays/on"
|
||||
payload: ""
|
||||
|
||||
cadmium_displays_off:
|
||||
alias: Cadmium · Displays OFF
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/commands/displays/off"
|
||||
payload: ""
|
||||
|
||||
cadmium_refresh:
|
||||
alias: Cadmium · Refresh
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "iotlink/workgroup/cadmium/refresh"
|
||||
payload: ""
|
||||
|
||||
automation:
|
||||
- alias: Cadmium · Turn off when idle
|
||||
trigger:
|
||||
platform: numeric_state
|
||||
entity_id: sensor.cadmium_idle_time
|
||||
above: 180
|
||||
action:
|
||||
- service: script.cadmium_shutdown
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "🖥 *Devices · Cadmium*"
|
||||
message: "Hey, I'm turning Cadmium off. It's been idling for 3 hours."
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "🖥 Devices · "
|
||||
message: "Cadmium · Turning off - idling for 3 hours"
|
||||
@@ -0,0 +1,23 @@
|
||||
# https://www.home-assistant.io/integrations/amcrest
|
||||
# amcrest:
|
||||
# - host: !secret amcrest_ip
|
||||
# username: !secret amcrest_username
|
||||
# password: !secret amcrest_password
|
||||
# resolution: low
|
||||
# binary_sensors:
|
||||
# - online
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
camera_state:
|
||||
friendly_name: Security camera
|
||||
device_class: safety
|
||||
value_template: >-
|
||||
{{ is_state('camera.mercury_amcrest_1', 'streaming') or is_state('camera.mercury_amcrest_1', 'recording') }}
|
||||
icon_template: >-
|
||||
{% if is_state('camera.mercury_amcrest_1', 'streaming') or is_state('camera.mercury_amcrest_1', 'recording') %}
|
||||
mdi:video
|
||||
{% else %}
|
||||
mdi:video-off
|
||||
{% endif %}
|
||||
@@ -0,0 +1,6 @@
|
||||
sensor:
|
||||
- platform: command_line
|
||||
name: Cobalt CPU Temperature
|
||||
command: "cat /sys/class/thermal/thermal_zone4/temp"
|
||||
unit_of_measurement: "°C"
|
||||
value_template: '{{ value | multiply(0.001) | round(1) }}'
|
||||
@@ -0,0 +1,39 @@
|
||||
script:
|
||||
open_living_room_cover:
|
||||
sequence:
|
||||
- service: cover.set_cover_position
|
||||
entity_id: cover.living_room
|
||||
data:
|
||||
position: "{{ position | default(80) }}"
|
||||
|
||||
toggle_living_room_cover:
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions: "{{ is_state_attr('cover.living_room', 'current_position', 0) }}"
|
||||
sequence:
|
||||
- service: script.open_living_room_cover
|
||||
- conditions: >-
|
||||
{{ state_attr('cover.living_room', 'current_position') >= 80 }}
|
||||
sequence:
|
||||
- service: cover.close_cover
|
||||
entity_id: cover.living_room
|
||||
default:
|
||||
- service: cover.close_cover
|
||||
entity_id: cover.living_room
|
||||
|
||||
|
||||
automation:
|
||||
- alias: Cover · Living Room · Open at morning
|
||||
trigger:
|
||||
platform: time
|
||||
at: "10:00:00"
|
||||
action:
|
||||
- service: script.open_living_room_cover
|
||||
|
||||
- alias: Cover · Living Room · Close after sunset
|
||||
trigger:
|
||||
platform: sun
|
||||
event: sunset
|
||||
action:
|
||||
- service: cover.close_cover
|
||||
entity_id: cover.living_room
|
||||
@@ -0,0 +1,54 @@
|
||||
mqtt:
|
||||
switch:
|
||||
- name: "Desk Outlet"
|
||||
state_topic: "stat/outlet_1/RESULT"
|
||||
value_template: "{{ value_json.POWER }}"
|
||||
command_topic: "cmnd/outlet_1/POWER"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
availability_topic: "tele/outlet_1/LWT"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
qos: 1
|
||||
|
||||
sensor:
|
||||
- name: "Desk Outlet Energy today"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.Today }}'
|
||||
device_class: power
|
||||
unit_of_measurement: "kWh"
|
||||
- name: "Desk Outlet Energy yesterday"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.Yesterday }}'
|
||||
device_class: power
|
||||
unit_of_measurement: "kWh"
|
||||
- name: "Desk Outlet Energy total"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.Total }}'
|
||||
device_class: power
|
||||
unit_of_measurement: "kWh"
|
||||
- name: "Desk Outlet Energy total start time"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.TotalStartTime }}'
|
||||
- name: "Desk Outlet Power"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.Power }}'
|
||||
device_class: power
|
||||
unit_of_measurement: "W"
|
||||
- name: "Desk Outlet Voltage"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.Voltage }}'
|
||||
unit_of_measurement: "V"
|
||||
- name: "Desk Outlet Current"
|
||||
state_topic: "tele/outlet_1/SENSOR"
|
||||
value_template: '{{ value_json.ENERGY.Current }}'
|
||||
unit_of_measurement: "A"
|
||||
|
||||
- name: "Desk Outlet WiFi"
|
||||
state_topic: "tele/outlet_1/STATE"
|
||||
unit_of_measurement: "%"
|
||||
value_template: "{{value_json.Wifi.RSSI }}"
|
||||
availability_topic: "tele/outlet_1/LWT"
|
||||
payload_available: "Online"
|
||||
payload_not_available: "Offline"
|
||||
device_class: signal_strength
|
||||
@@ -0,0 +1,37 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Desk switch battery"
|
||||
state_topic: "z2m_deconz/desk_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- name: "Desk switch LQI"
|
||||
state_topic: "z2m_deconz/desk_switch"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "lqi"
|
||||
device_class: "signal_strength"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
|
||||
automation:
|
||||
- alias: Living room · Desk switch
|
||||
use_blueprint:
|
||||
path: aqara_switch.yaml
|
||||
input:
|
||||
z2m_topic: "z2m_deconz/desk_switch"
|
||||
click:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.living_room_main
|
||||
brightness_pct: "{{ is_state('sensor.house_mode', 'night') | iif(40, 100) }}"
|
||||
|
||||
double_click:
|
||||
- service: light.toggle
|
||||
data_template:
|
||||
entity_id: light.living_room_ambient
|
||||
brightness_pct: "{{ is_state('sensor.house_mode', 'night') | iif(40, 100) }}"
|
||||
|
||||
hold:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
@@ -0,0 +1,72 @@
|
||||
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": "0x807FD827" }'
|
||||
|
||||
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": "0x807F7887" }'
|
||||
|
||||
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": "0x807FB04F" }'
|
||||
|
||||
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": "0x807F48B7" }'
|
||||
|
||||
hdmi_switch_5:
|
||||
alias: HDMI Swtich · Set to 5
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x807F08F7" }'
|
||||
|
||||
hdmi_switch_next:
|
||||
alias: HDMI Swtich · Next
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x807F30CF" }'
|
||||
|
||||
hdmi_switch_prev:
|
||||
alias: HDMI Swtich · Prev
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x807FA05F" }'
|
||||
|
||||
hdmi_switch_on:
|
||||
alias: HDMI Swtich · On
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x807F3AC5" }'
|
||||
|
||||
hdmi_switch_off:
|
||||
alias: HDMI Swtich · Off
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x807FF807" }'
|
||||
@@ -0,0 +1,64 @@
|
||||
script:
|
||||
old_hdmi_switch_1:
|
||||
alias: Old HDMI Swtich · Set to 1
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE48B7" }'
|
||||
|
||||
old_hdmi_switch_2:
|
||||
alias: Old HDMI Swtich · Set to 2
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE58A7" }'
|
||||
|
||||
old_hdmi_switch_3:
|
||||
alias: Old HDMI Swtich · Set to 3
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE7887" }'
|
||||
|
||||
old_hdmi_switch_4:
|
||||
alias: Old HDMI Swtich · Set to 4
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE807F" }'
|
||||
|
||||
old_hdmi_switch_next:
|
||||
alias: Old HDMI Swtich · Next
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FEC03F" }'
|
||||
|
||||
old_hdmi_switch_pip:
|
||||
alias: Old HDMI Swtich · PIP
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FE50AF" }'
|
||||
|
||||
old_hdmi_switch_sel:
|
||||
alias: Old HDMI Swtich · SEL
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FED827" }'
|
||||
|
||||
old_hdmi_switch_enter:
|
||||
alias: Old HDMI Swtich · Enter
|
||||
sequence:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: cmnd/ir_blaster_1/IRSend
|
||||
payload: '{ "Protocol": "NEC", "Bits": 32, "Data": "0x01FEF807" }'
|
||||
@@ -0,0 +1,130 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Living room Opple action"
|
||||
state_topic: "z2m_deconz/opple_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:gesture-double-tap"
|
||||
value_template: "{{ value_json.action }}"
|
||||
- name: "Living room Opple battery"
|
||||
state_topic: "z2m_deconz/opple_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "%"
|
||||
device_class: "battery"
|
||||
value_template: "{{ value_json.battery }}"
|
||||
- name: "Living room Opple LQI"
|
||||
state_topic: "z2m_deconz/opple_2"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "lqi"
|
||||
device_class: "signal_strength"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
- alias: Living room · Opple
|
||||
use_blueprint:
|
||||
path: oppo_6_btn_switch.yaml
|
||||
input:
|
||||
opple_z2m_name: "z2m_deconz/opple_2"
|
||||
action_sensor: sensor.living_room_opple_action
|
||||
|
||||
button_1_single:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room
|
||||
|
||||
button_2_single:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room
|
||||
|
||||
button_1_double:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_main
|
||||
|
||||
button_2_double:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_main
|
||||
|
||||
button_1_triple:
|
||||
- service: light.turn_off
|
||||
entity_id: light.living_room_ambient
|
||||
|
||||
button_2_triple:
|
||||
- service: light.turn_on
|
||||
entity_id: light.living_room_ambient
|
||||
|
||||
button_2_release:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.living_room_ambient_neon
|
||||
|
||||
button_3_single:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
button_3_double:
|
||||
- service: script.sonos_join_tv
|
||||
|
||||
button_3_triple:
|
||||
- service: script.sonos_join_bedroom
|
||||
|
||||
button_3_release:
|
||||
- service: media_player.play_next
|
||||
entity_id: media_player.living_room
|
||||
|
||||
button_4_single:
|
||||
- service: script.music_play
|
||||
|
||||
button_4_double:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Starred'
|
||||
|
||||
button_4_triple:
|
||||
- service: script.music_play
|
||||
data:
|
||||
playlist: 'Retro'
|
||||
|
||||
button_5_single:
|
||||
- service: climate.turn_off
|
||||
entity_id: climate.toshiba_ac
|
||||
|
||||
button_5_double:
|
||||
- service: climate.set_temperature
|
||||
entity_id: climate.toshiba_ac
|
||||
data_template:
|
||||
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int -1}}"
|
||||
|
||||
button_6_single:
|
||||
- service: script.toshiba_ac_toggle
|
||||
|
||||
button_6_double:
|
||||
- service: climate.set_temperature
|
||||
entity_id: climate.toshiba_ac
|
||||
data_template:
|
||||
temperature: "{{ state_attr('climate.toshiba_ac', 'temperature') | int +1}}"
|
||||
|
||||
button_6_triple:
|
||||
- service: automation.turn_off
|
||||
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||
|
||||
- service: media_player.joing
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
group_members:
|
||||
- media_player.kitchen
|
||||
- media_player.bathroom
|
||||
|
||||
# Music play, without the join
|
||||
- service: media_player.volume_set
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
volume_level: 0.2
|
||||
- service: media_player.shuffle_set
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
shuffle: true
|
||||
- service: media_player.select_source
|
||||
entity_id: media_player.master_bedroom
|
||||
data:
|
||||
source: "Evening Chill"
|
||||
|
||||
- delay: 00:01:00
|
||||
- service: automation.turn_on
|
||||
entity_id: automation.tv_sonos_join_tv_on_google_cast
|
||||
@@ -0,0 +1,211 @@
|
||||
input_boolean:
|
||||
ac_heating:
|
||||
name: AC Heating enabled
|
||||
icon: mdi:air-conditioner
|
||||
|
||||
# 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"
|
||||
|
||||
input_number:
|
||||
toshiba_heat_temp:
|
||||
name: AC heat temp
|
||||
unit_of_measurement: "ºC"
|
||||
min: 24
|
||||
max: 30
|
||||
step: 1
|
||||
icon: mdi:air-conditioner
|
||||
toshiba_cool_temp:
|
||||
name: AC cool temp
|
||||
unit_of_measurement: "ºC"
|
||||
min: 17
|
||||
max: 25
|
||||
step: 1
|
||||
icon: mdi:air-conditioner
|
||||
toshiba_trigger_temp:
|
||||
name: AC cooling trigger temp
|
||||
unit_of_measurement: "ºC"
|
||||
min: 18
|
||||
max: 28
|
||||
step: 1
|
||||
icon: mdi:air-conditioner
|
||||
|
||||
template:
|
||||
- binary_sensor:
|
||||
- name: Toshiba AC Climate conditions met
|
||||
state: >
|
||||
{% set temp_matching = states('sensor.multisensor_6_temperature')|float >= states('input_number.toshiba_trigger_temp')|float %}
|
||||
{% set outside_temp_high = states('sensor.dark_sky_apparent_temperature')|float + 2 >= states('input_number.toshiba_trigger_temp')|float %}
|
||||
{% set someone_home = is_state('binary_sensor.someone_home', 'on') %}
|
||||
{% set ac_off = is_state('climate.toshiba_ac', 'off') %}
|
||||
|
||||
{{ temp_matching and outside_temp_high and someone_home and ac_off }}
|
||||
|
||||
- name: Toshiba AC conditions met
|
||||
icon: >
|
||||
{{ is_state('binary_sensor.toshiba_ac_conditions_met', 'on') | iif('mdi:home-thermometer', 'mdi:home-thermometer-outline') }}
|
||||
|
||||
state: >
|
||||
{% set temp_matching = states('sensor.multisensor_6_temperature')|float >= states('input_number.toshiba_trigger_temp')|float %}
|
||||
{% set outside_temp_high = states('sensor.dark_sky_apparent_temperature')|float + 2 >= states('input_number.toshiba_trigger_temp')|float %}
|
||||
{% set someone_home = is_state('binary_sensor.someone_home', 'on') %}
|
||||
{% set bedroom_ready = is_state('group.bedroom_windows', 'off') or is_state('binary_sensor.bedroom_door', 'off') %}
|
||||
{% set kitchen_ready = is_state('binary_sensor.kitchen_window', 'off') or is_state('binary_sensor.kitchen_door', 'off') %}
|
||||
{% set ac_off = is_state('climate.toshiba_ac', 'off') %}
|
||||
{{ temp_matching and outside_temp_high and someone_home and bedroom_ready and kitchen_ready and ac_off }}
|
||||
|
||||
script:
|
||||
toshiba_ac_toggle:
|
||||
sequence:
|
||||
- service: >-
|
||||
{% if is_state('climate.toshiba_ac', 'off') and is_state('input_boolean.ac_heating', 'off') %}
|
||||
script.toshiba_ac_on_cool
|
||||
{% elif is_state('climate.toshiba_ac', 'off') and is_state('input_boolean.ac_heating', 'on') %}
|
||||
script.toshiba_ac_on_heat
|
||||
{% else %}
|
||||
climate.turn_off
|
||||
{% endif %}
|
||||
data_template:
|
||||
entity_id: "{% if not is_state('climate.toshiba_ac', 'off') %}climate.toshiba_ac{%endif%}"
|
||||
|
||||
toshiba_ac_on_cool:
|
||||
sequence:
|
||||
- service: climate.turn_on
|
||||
entity_id: climate.toshiba_ac
|
||||
- delay: "00:00:01"
|
||||
- service: climate.set_hvac_mode
|
||||
entity_id: climate.toshiba_ac
|
||||
data:
|
||||
hvac_mode: "cool"
|
||||
- delay: "00:00:01"
|
||||
- service: climate.set_fan_mode
|
||||
entity_id: climate.toshiba_ac
|
||||
data:
|
||||
fan_mode: "auto"
|
||||
- delay: "00:00:01"
|
||||
- service: climate.set_temperature
|
||||
entity_id: climate.toshiba_ac
|
||||
data_template:
|
||||
temperature: "{{ states('input_number.toshiba_cool_temp') | default(19) }}"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "AC · Switching on · Cool"
|
||||
domain: climate
|
||||
|
||||
toshiba_ac_on_heat:
|
||||
sequence:
|
||||
- service: climate.turn_on
|
||||
entity_id: climate.toshiba_ac
|
||||
- delay: "00:00:01"
|
||||
- service: climate.set_hvac_mode
|
||||
entity_id: climate.toshiba_ac
|
||||
data:
|
||||
hvac_mode: "heat"
|
||||
- delay: "00:00:01"
|
||||
- service: climate.set_fan_mode
|
||||
entity_id: climate.toshiba_ac
|
||||
data:
|
||||
fan_mode: "auto"
|
||||
- delay: "00:00:01"
|
||||
- service: climate.set_temperature
|
||||
entity_id: climate.toshiba_ac
|
||||
data_template:
|
||||
temperature: "{{ states('input_number.toshiba_heat_temp') | default(26) }}"
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "AC · Switching on · Heat"
|
||||
domain: climate
|
||||
|
||||
toshiba_ac_on_cool_if_hot:
|
||||
sequence:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.toshiba_ac_conditions_met
|
||||
state: 'on'
|
||||
- service: script.toshiba_ac_on_cool
|
||||
|
||||
automation:
|
||||
- alias: Climate · AC · Turn on if hot
|
||||
trigger:
|
||||
- platform: template
|
||||
value_template: "{{ states('sensor.multisensor_6_temperature')|float|default(0) > states('input_number.toshiba_trigger_temp')|float }}"
|
||||
for: "00:05:00"
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.living_room_right_window
|
||||
- group.bedroom_windows
|
||||
- binary_sensor.kitchen_window
|
||||
- binary_sensor.kitchen_door
|
||||
from: "on"
|
||||
to: "off"
|
||||
action:
|
||||
- service: script.toshiba_ac_on_cool_if_hot
|
||||
|
||||
- alias: Climate · AC · Turn off
|
||||
trigger:
|
||||
- platform: time
|
||||
at: "05:00:00"
|
||||
|
||||
# TODO: this below trigger works only for summer :)
|
||||
- platform: numeric_state
|
||||
entity_id: sensor.multisensor_6_temperature
|
||||
below: 23
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- binary_sensor.living_room_right_window
|
||||
- group.bedroom_windows
|
||||
from: "off"
|
||||
to: "on"
|
||||
for: "00:01:00"
|
||||
condition:
|
||||
condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: climate.toshiba_ac
|
||||
state: 'off'
|
||||
action:
|
||||
- service: climate.turn_off
|
||||
entity_id: climate.toshiba_ac
|
||||
- service: logbook.log
|
||||
data:
|
||||
name: "💨 Climate Module · "
|
||||
message: "AC · Switching off"
|
||||
domain: climate
|
||||
|
||||
- alias: Climate · AC · Notify conditions met
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.toshiba_ac_climate_conditions_met
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
action:
|
||||
- service: notify.telegram
|
||||
data:
|
||||
title: "💨 Climate Module · AC · Conditions met"
|
||||
message: "I would turn the AC on, but some windows or doors are open."
|
||||
@@ -0,0 +1,129 @@
|
||||
mqtt:
|
||||
sensor:
|
||||
- name: "Trust remote action"
|
||||
state_topic: "z2m_deconz/trust_remote"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:gesture-double-tap"
|
||||
value_template: "{{ value_json.action }}"
|
||||
- name: "Trust remote group"
|
||||
state_topic: "z2m_deconz/trust_remote"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
icon: "mdi:lightbulb-group"
|
||||
value_template: "{{ value_json.action_group }}"
|
||||
- name: "Trust remote LQI"
|
||||
state_topic: "z2m_deconz/trust_remote"
|
||||
availability_topic: "z2m_deconz/bridge/state"
|
||||
unit_of_measurement: "lqi"
|
||||
device_class: "signal_strength"
|
||||
value_template: "{{ value_json.linkquality }}"
|
||||
|
||||
automation:
|
||||
- alias: Trust remote · Guest bedroom
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: z2m_deconz/trust_remote
|
||||
action:
|
||||
- choose:
|
||||
- conditions: "{{ trigger.payload_json.action == 'up-press' }}"
|
||||
sequence:
|
||||
- service: light.turn_on
|
||||
entity_id: light.tradfri_large
|
||||
data_template:
|
||||
brightness_pct: "{{ is_state('input_select.guest_bedroom_mode', 'day') | iif(100, 10) }}"
|
||||
color_temp: "{{ states('input_number.guest_bedroom_light_temp') }}"
|
||||
- conditions: "{{ trigger.payload_json.action == 'down-press' }}"
|
||||
sequence:
|
||||
- service: light.turn_off
|
||||
entity_id: light.tradfri_large
|
||||
- conditions: "{{ trigger.payload_json.action == 'on' or trigger.payload_json.action == 'off' }}"
|
||||
sequence:
|
||||
- service: script.guest_bedroom_bedside_confirm
|
||||
- service: input_select.select_next
|
||||
entity_id: input_select.guest_bedroom_mode
|
||||
|
||||
- alias: Trust remote · Dimming
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.trust_remote_action
|
||||
to: "down-press"
|
||||
- platform: state
|
||||
entity_id: sensor.trust_remote_action
|
||||
to: "up-press"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: >-
|
||||
{% set groupId = states('sensor.trust_remote_group')[4] | int %}
|
||||
{% if groupId == 5 %}
|
||||
{% set entityId = 'light.living_room' %}
|
||||
{% elif groupId == 0 %}
|
||||
{% set entityId = 'light.living_room_main' %}
|
||||
{% elif groupId == 1 %}
|
||||
{% set entityId = 'light.pc' %}
|
||||
{% elif groupId == 2 %}
|
||||
{% set entityId = 'light.living_room_ambient' %}
|
||||
{% elif groupId == 3 %}
|
||||
{% set entityId = 'light.living_room_ambient_main' %}
|
||||
{% elif groupId == 4 %}
|
||||
{% set entityId = 'light.light_lohas_2' %}
|
||||
{% endif %}
|
||||
|
||||
{{ entityId }}
|
||||
|
||||
brightness_step_pct: >-
|
||||
{% if trigger.to_state.state == "up-press" %}
|
||||
20
|
||||
{% else %}
|
||||
-20
|
||||
{% endif %}
|
||||
|
||||
- alias: Trust remote · Turn on
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: z2m_deconz/trust_remote
|
||||
condition: "{{ trigger.payload_json.action == 'on' }}"
|
||||
action:
|
||||
- service: light.turn_on
|
||||
data_template:
|
||||
entity_id: >-
|
||||
{% set groupId = (trigger.payload_json.action_group % 10) %}
|
||||
{% if groupId == 5 %}
|
||||
light.living_room
|
||||
{% elif groupId == 0 %}
|
||||
light.living_room_main
|
||||
{% elif groupId == 1 %}
|
||||
light.pc
|
||||
{% elif groupId == 2 %}
|
||||
light.living_room_ambient
|
||||
{% elif groupId == 3 %}
|
||||
light.living_room_ambient_main
|
||||
{% elif groupId == 4 %}
|
||||
light.light_lohas_2
|
||||
{% endif %}
|
||||
brightness_pct: 100
|
||||
|
||||
- alias: Trust remote · Turn off
|
||||
trigger:
|
||||
- platform: mqtt
|
||||
topic: z2m_deconz/trust_remote
|
||||
condition: "{{ trigger.payload_json.action == 'off' }}"
|
||||
action:
|
||||
- service: light.turn_off
|
||||
data_template:
|
||||
entity_id: >-
|
||||
{% set groupId = (trigger.payload_json.action_group % 10) %}
|
||||
{% if groupId == 5 %}
|
||||
{% set entityId = 'light.living_room' %}
|
||||
{% elif groupId == 0 %}
|
||||
{% set entityId = 'light.living_room_main' %}
|
||||
{% elif groupId == 1 %}
|
||||
{% set entityId = 'light.pc' %}
|
||||
{% elif groupId == 2 %}
|
||||
{% set entityId = 'light.living_room_ambient' %}
|
||||
{% elif groupId == 3 %}
|
||||
{% set entityId = 'light.living_room_ambient_main' %}
|
||||
{% elif groupId == 4 %}
|
||||
{% set entityId = 'light.light_lohas_2' %}
|
||||
{% endif %}
|
||||
|
||||
{{ entityId }}
|
||||
@@ -0,0 +1,178 @@
|
||||
|
||||
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_bulsatcom_toggle:
|
||||
icon: mdi:remote-tv
|
||||
alias: TV · Bulsatcom toggle
|
||||
sequence:
|
||||
- service: script.bulsatcom_power
|
||||
- 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: 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
|
||||
trigger:
|
||||
- platform: webostv.turn_on
|
||||
entity_id: media_player.living_room_tv
|
||||
action:
|
||||
- service: wake_on_lan.send_magic_packet
|
||||
data:
|
||||
mac: 78:5D:C8:C9:DB:76
|
||||
- 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: sensor.house_mode
|
||||
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 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
|
||||
- delay: "00:00:15"
|
||||
- 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: "{{ 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
|
||||
|
||||
- alias: TV · Prepare for casting
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: media_player.nvidia_shield
|
||||
to: 'playing'
|
||||
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
|
||||
data:
|
||||
source: Shield
|
||||
|
||||
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
|
||||
@@ -0,0 +1,99 @@
|
||||
automation:
|
||||
- alias: Wallmote · Living room · 1 · Tap · Toggle lights
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyPressed"
|
||||
property: "scene"
|
||||
property_key: "001"
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.living_room
|
||||
|
||||
- alias: Wallmote · Living room · 1 · Toggle · PC Light
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyReleased"
|
||||
property: "scene"
|
||||
property_key: "001"
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.pc
|
||||
|
||||
- alias: Wallmote · Living room · 2 · Tap · Toggle Music
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyPressed"
|
||||
property: "scene"
|
||||
property_key: "002"
|
||||
action:
|
||||
- service: media_player.media_play_pause
|
||||
entity_id: media_player.living_room
|
||||
|
||||
- alias: Wallmote · Living room · 2 · Hold · Play music
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyReleased"
|
||||
property: "scene"
|
||||
property_key: "002"
|
||||
action:
|
||||
- service: script.music_play
|
||||
|
||||
- alias: Wallmote · Living room · 3 · Tap · Toggle Main lights
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyPressed"
|
||||
property_key: "003"
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id:
|
||||
- light.living_room_main
|
||||
- light.pc
|
||||
|
||||
- alias: Wallmote · Living room · 3 · Hold · Toggle Ambient lights
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyReleased"
|
||||
property_key: "003"
|
||||
action:
|
||||
- service: light.toggle
|
||||
entity_id: light.living_room_ambient
|
||||
|
||||
- alias: Wallmote · Living room · 4 · Tap · Toggle AC
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyPressed"
|
||||
property_key: "004"
|
||||
action:
|
||||
- service: script.toshiba_ac_toggle
|
||||
|
||||
- alias: Wallmote · Living room · 4 · Hold · Toggle Cover
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: zwave_js_value_notification
|
||||
event_data:
|
||||
node_id: 5
|
||||
value: "KeyReleased"
|
||||
property_key: "004"
|
||||
action:
|
||||
- service: script.toggle_living_room_cover
|
||||
@@ -0,0 +1,42 @@
|
||||
camera:
|
||||
- platform: xiaomi_cloud_map_extractor
|
||||
host: !secret vacuum_host
|
||||
token: !secret vacuum_token
|
||||
username: !secret vacuum_username
|
||||
password: !secret vacuum_password
|
||||
draw: ['all']
|
||||
attributes:
|
||||
- calibration_points
|
||||
- charger
|
||||
- goto
|
||||
- goto_path
|
||||
- goto_predicted_path
|
||||
- image
|
||||
- is_empty
|
||||
- map_name
|
||||
- no_go_areas
|
||||
- no_mopping_areas
|
||||
- obstacles
|
||||
- path
|
||||
- room_numbers
|
||||
- rooms
|
||||
- vacuum_position
|
||||
- vacuum_room
|
||||
- walls
|
||||
- zones
|
||||
colors:
|
||||
color_map_outside: [35, 35, 35]
|
||||
color_map_wall: [255, 255, 255]
|
||||
color_map_inside: [10, 10, 10]
|
||||
room_colors:
|
||||
1: [240, 178, 122]
|
||||
2: [133, 193, 233]
|
||||
3: [217, 136, 128]
|
||||
4: [52, 152, 219]
|
||||
5: [205, 97, 85]
|
||||
6: [243, 156, 18]
|
||||
|
||||
homeassistant:
|
||||
customize:
|
||||
vacuum.vacuum:
|
||||
icon: bha:roborock
|
||||
Reference in New Issue
Block a user