This commit is contained in:
2022-05-07 10:58:10 +03:00
parent 4272699dc7
commit 245153b49e
7 changed files with 16 additions and 60 deletions

View File

@@ -48,13 +48,7 @@ automation:
- service: light.turn_on
data_template:
entity_id: light.master_bedroom_main
brightness_pct: >-
{% if not is_state('input_select.bedroom_mode', 'day') %}
40
{% else %}
100
{% endif %}
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'day') | iif(100, 40) }}"
button_1_triple:
- service: light.turn_off
@@ -68,13 +62,7 @@ automation:
entity_id:
- light.bedside
- light.bed_led
brightness_pct: >-
{% if not is_state('input_select.bedroom_mode', 'day') %}
40
{% else %}
100
{% endif %}
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'day') | iif(100, 40) }}"
button_3_single:
- service: media_player.media_play_pause

View File

@@ -30,13 +30,11 @@ automation:
{% elif is_state('input_select.bedroom_mode', 'bed') %}
light.bedside
{% endif %}
brightness_pct: >-
{% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 {% endif %}
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'night') | iif(40, 100)}}"
- service: script.bed_led_toggle
data_template:
brightness_pct: >-
{% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 {% endif %}
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'night') | iif(40, 100)}}"
double_click:
@@ -46,8 +44,7 @@ automation:
brightness_pct: 100
- service: script.bed_led_toggle
data_template:
brightness_pct: >-
{% if is_state('input_select.bedroom_mode', 'night') %} 40 {% else %} 100 {% endif %}
brightness_pct: "{{ is_state('input_select.bedroom_mode', 'night') | iif(40, 100)}}"
hold:
- service: input_select.select_next

View File

@@ -79,11 +79,7 @@ sensor:
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 %}
{{ 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"
@@ -160,11 +156,7 @@ script:
entity_id: fan.philips_airpurifier
data_template:
function: >-
{% if state_attr('fan.philips_airpurifier', 'function') == 'Purification' %}
{{ 'Purification & Humidification' }}
{% else %}
{{ 'Purification' }}
{% endif %}
{{ state_attr('fan.philips_airpurifier', 'function') == 'Purification' | iif('Purification & Humidification', 'Purification') }}
automation:
- alias: Purifier · On start · Sync and update state

View File

@@ -25,25 +25,13 @@ automation:
- service: light.toggle
data_template:
entity_id: light.living_room_main
brightness_pct: >-
{% if is_state('sensor.house_mode', 'night') %}
40
{% else %}
100
{% endif %}
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: >-
{% if is_state('sensor.house_mode', 'night') %}
40
{% else %}
100
{% endif %}
brightness_pct: "{{ is_state('sensor.house_mode', 'night') | iif(40, 100) }}"
hold:
- service: media_player.media_play_pause

View File

@@ -12,11 +12,7 @@ binary_sensor:
value_template: >-
{{ is_state("binary_sensor.titanium_ping", "on") }}
icon_template: >-
{% if is_state("binary_sensor.titanium_ping", "on") %}
mdi:desktop-mac-dashboard
{% else %}
mdi:desktop-mac
{% endif %}
{{ is_state("binary_sensor.titanium_ping", "on") | iif(' mdi:desktop-mac-dashboard', 'mdi:desktop-mac') }}
- platform: mqtt
name: "Titanium playing"
@@ -163,12 +159,7 @@ switch:
turn_off:
service: script.titanium_shutdown
icon_template: >-
{% if is_state('binary_sensor.titanium', 'on') %}
mdi:monitor-dashboard
{% else %}
mdi:monitor-off
{% endif %}
{{ is_state('binary_sensor.titanium', 'on') | iif('mdi:monitor-dashboard', 'mdi:monitor-off') }}
script:
titanium_start:

View File

@@ -122,7 +122,7 @@ script:
sequence:
- condition: and
conditions:
- condition: "{{ states('sensor.multisensor_6_temperature')|float > states('input_number.toshiba_trigger_temp')|float }}"
- "{{ states('sensor.multisensor_6_temperature')|float > states('input_number.toshiba_trigger_temp')|float }}"
- condition: numeric_state
entity_id: sensor.dark_sky_apparent_temperature
above: 23

View File

@@ -5,10 +5,10 @@ binary_sensor:
friendly_name: Milena Preferences
value_template: "{{ is_state('device_tracker.iphone_de_yovcheva', 'home') }}"
icon_template: >
{% if is_state('device_tracker.iphone_de_yovcheva', 'home') %} mdi:star-settings
{% else %} mdi:star-settings-outline
{% endif %}
{{
is_state('device_tracker.iphone_de_yovcheva', 'home')
| iif('mdi:star-settings', 'mdi:star-settings-outline')
}}
automation:
- alias: Preferences · Milena · Enable