WIP condizioni per sensore finestra NOK
This commit is contained in:
@@ -41,26 +41,79 @@ conditions:
|
||||
below: !input ext_temp_limit
|
||||
|
||||
actions:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: !input window_sensor
|
||||
state: "open"
|
||||
for:
|
||||
hours: 0
|
||||
minutes: 0
|
||||
seconds: 10
|
||||
then:
|
||||
- action: climate.set_hvac_mode
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: !input window_sensor
|
||||
state: "Open"
|
||||
sequence:
|
||||
- action: climate.set_hvac_mode
|
||||
metadata: {}
|
||||
data:
|
||||
hvac_mode: "off"
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
- action: switch.turn_on
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 62352ecf274ff68e3ddfbc979406d49d
|
||||
- action: notify.mobile_app_ttrabatt_iphone15pro
|
||||
metadata: {}
|
||||
data:
|
||||
message: Home Assistant DEBUG
|
||||
title: Dovrebbe essere finestra aperta
|
||||
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: !input window_sensor
|
||||
state: "Closed"
|
||||
sequence:
|
||||
- action: climate.set_hvac_mode
|
||||
metadata: {}
|
||||
data:
|
||||
hvac_mode: "heat"
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
- action: switch.turn_off
|
||||
metadata: {}
|
||||
data: {}
|
||||
target:
|
||||
device_id: 62352ecf274ff68e3ddfbc979406d49d
|
||||
- action: notify.mobile_app_ttrabatt_iphone15pro
|
||||
metadata: {}
|
||||
data:
|
||||
message: Home Assistant DEBUG
|
||||
title: Dovrebbe essere finestra chiusa
|
||||
|
||||
default:
|
||||
- action: notify.mobile_app_ttrabatt_iphone15pro
|
||||
metadata: {}
|
||||
data:
|
||||
hvac_mode: "off"
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
else:
|
||||
- action: climate.set_hvac_mode
|
||||
metadata: {}
|
||||
data:
|
||||
hvac_mode: heat
|
||||
target:
|
||||
entity_id: !input climate_target
|
||||
mode: single
|
||||
title: HA script error
|
||||
message: >
|
||||
le condizioni non vanno cazzo: state: {{ states('binary_sensor.salottopt_finestra_contact') }}
|
||||
|
||||
# - if:
|
||||
# - condition: state
|
||||
# entity_id: !input window_sensor
|
||||
# state: "true"
|
||||
# for:
|
||||
# hours: 0
|
||||
# minutes: 0
|
||||
# seconds: 10
|
||||
# then:
|
||||
# - action: climate.set_hvac_mode
|
||||
# metadata: {}
|
||||
# data:
|
||||
# hvac_mode: "off"
|
||||
# target:
|
||||
# entity_id: !input climate_target
|
||||
# else:
|
||||
# - action: climate.set_hvac_mode
|
||||
# metadata: {}
|
||||
# data:
|
||||
# hvac_mode: heat
|
||||
# target:
|
||||
# entity_id: !input climate_target
|
||||
# mode: single
|
||||
|
||||
Reference in New Issue
Block a user