and shorthand

This commit is contained in:
2022-05-07 11:15:01 +03:00
parent bbb9c4e9c9
commit 4d2558cb69
10 changed files with 46 additions and 66 deletions
@@ -34,8 +34,7 @@ action:
color_temp: !input day_temp
- conditions:
condition: and
conditions:
and:
- condition: sun
after: sunset
- condition: not
@@ -255,8 +255,7 @@ automation:
entity_id: sensor.bedroom_weather_humidity
below: 20
condition:
condition: and
conditions:
and:
- condition: state
entity_id: binary_sensor.purifier_out_of_water
state: "off"
@@ -288,8 +287,7 @@ automation:
entity_id: sensor.purifier_air_quality
above: 30
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.someone_home
state: "on"
@@ -331,8 +329,7 @@ automation:
entity_id: sensor.bedroom_weather_humidity
above: 55
condition:
condition: and
conditions:
and:
- condition: state
entity_id: fan.philips_airpurifier
state: "on"
@@ -360,8 +357,7 @@ automation:
entity_id: sensor.purifier_air_quality
below: 20
condition:
condition: and
conditions:
and:
- condition: state
entity_id: fan.philips_airpurifier
state: "on"
@@ -42,8 +42,7 @@ automation:
device_ieee: !secret magic_cube_ieee
command: knock
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.magic_cube_enabled
state: "on"
@@ -62,8 +61,7 @@ automation:
device_ieee: !secret magic_cube_ieee
command: rotate_left
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.magic_cube_enabled
state: "on"
@@ -84,8 +82,7 @@ automation:
device_ieee: !secret magic_cube_ieee
command: rotate_right
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.magic_cube_enabled
state: "on"
@@ -107,8 +104,7 @@ automation:
device_ieee: !secret magic_cube_ieee
command: knock
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.magic_cube_enabled
state: "on"
@@ -127,8 +123,7 @@ automation:
device_ieee: !secret magic_cube_ieee
command: rotate_left
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.magic_cube_enabled
state: "on"
@@ -147,8 +142,7 @@ automation:
device_ieee: !secret magic_cube_ieee
command: rotate_right
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.magic_cube_enabled
state: "on"
@@ -120,8 +120,7 @@ script:
toshiba_ac_on_cool_if_hot:
sequence:
- condition: and
conditions:
- and:
- "{{ states('sensor.multisensor_6_temperature')|float > states('input_number.toshiba_trigger_temp')|float }}"
- condition: numeric_state
entity_id: sensor.dark_sky_apparent_temperature
+14 -16
View File
@@ -24,14 +24,13 @@ script:
maybe_turn_radiator_on:
alias: Climate · Heating · Maybe turn radiator on
sequence:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.heating_enabled
state: "on"
- condition: state
entity_id: binary_sensor.someone_home
state: "on"
- and:
- condition: state
entity_id: input_boolean.heating_enabled
state: "on"
- condition: state
entity_id: binary_sensor.someone_home
state: "on"
- service: climate.turn_on
data_template:
entity_id: "{{ entity_id }}"
@@ -57,14 +56,13 @@ script:
turn_on_all_radiators:
alias: Climate · Heating · Turn on all radiators
sequence:
- condition: and
conditions:
- condition: state
entity_id: input_boolean.heating_enabled
state: "on"
- condition: state
entity_id: binary_sensor.someone_home
state: "on"
- and:
- condition: state
entity_id: input_boolean.heating_enabled
state: "on"
- condition: state
entity_id: binary_sensor.someone_home
state: "on"
- service: script.maybe_turn_radiator_on
data:
entity_id: climate.living_room_radiator_mode
+1 -2
View File
@@ -16,8 +16,7 @@ automation:
platform: template
value_template: "{{ states('sensor.time') == states('input_datetime.alarm_time')[0:5] }}"
condition:
condition: and
conditions:
and:
- condition: state
entity_id: input_boolean.alarm_enabled
state: "on"
@@ -129,8 +129,7 @@ automation:
entity_id: binary_sensor.bedroom_door
to: "on"
condition:
condition: and
conditions:
and:
- condition: sun
after: sunset
after_offset: "-02:00:00"
+1 -2
View File
@@ -52,8 +52,7 @@ automation:
entity_id: binary_sensor.front_door
to: "on"
condition:
condition: and
conditions:
and:
- condition: state
entity_id: person.georgi
state: "not_home"
+10 -12
View File
@@ -46,12 +46,11 @@ script:
routine_coming_home_during_daytime:
alias: Routine · Coming home · During daytime
sequence:
- condition: and
conditions:
- condition: sun
after: sunrise
- condition: sun
before: sunset
- and:
- condition: sun
after: sunrise
- condition: sun
before: sunset
- service: script.open_living_room_cover
routine_coming_home_after_sunset:
@@ -89,12 +88,11 @@ script:
timeout: 00:02:00
- delay: 00:00:01
- condition: and
conditions:
- condition: time
before: "23:00:00"
- condition: time
after: "9:00:00"
- and:
- condition: time
before: "23:00:00"
- condition: time
after: "9:00:00"
- service: script.say
data_template:
+7 -8
View File
@@ -15,14 +15,13 @@ script:
- service: script.shield_screensaver
# Only when no guests are present
- condition: and
conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
- condition: state
entity_id: input_boolean.guest_bedroom
state: "off"
- and:
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
- condition: state
entity_id: input_boolean.guest_bedroom
state: "off"
- wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}"
timeout: 00:02:00
- delay: 00:00:0