Use bayesian sensor for rain-awareness
This commit is contained in:
@ -1598,11 +1598,9 @@ automation:
|
||||
alias: Rain Window Warning
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: sensor.pirateweather_precip
|
||||
from: 'none'
|
||||
not_to:
|
||||
- unavailable
|
||||
- unknown
|
||||
entity_id: binary_sensor.raining_bayesian
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.windows
|
||||
@ -1620,13 +1618,13 @@ automation:
|
||||
who: everywhere
|
||||
type: weather
|
||||
message: "It is raining and there are windows open in the house. Please close them!"
|
||||
- wait_template: "{{ is_state('binary_sensor.windows','off') or is_state('sensor.pirateweather_precip','none') }}"
|
||||
- wait_template: "{{ is_state('binary_sensor.windows','off') or is_state('binary_sensor.raining_bayesian','none') }}"
|
||||
timeout: "00:15:00"
|
||||
continue_on_timeout: true
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('binary_sensor.windows','off') and states('sensor.pirateweather_precip') not in ['none'] }}"
|
||||
value_template: "{{ is_state('binary_sensor.windows','off') and states('binary_sensor.raining_bayesian') not in ['none'] }}"
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
@ -1641,7 +1639,7 @@ automation:
|
||||
message: "Windows are now closed. Thank you, and enjoy your dry house."
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('sensor.pirateweather_precip','none') }}"
|
||||
value_template: "{{ is_state('binary_sensor.raining_bayesian','none') }}"
|
||||
sequence:
|
||||
- service: script.text_notify
|
||||
data:
|
||||
|
Reference in New Issue
Block a user