Use bayesian sensor for rain-awareness
This commit is contained in:
@ -1598,11 +1598,9 @@ automation:
|
|||||||
alias: Rain Window Warning
|
alias: Rain Window Warning
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: sensor.pirateweather_precip
|
entity_id: binary_sensor.raining_bayesian
|
||||||
from: 'none'
|
from: 'off'
|
||||||
not_to:
|
to: 'on'
|
||||||
- unavailable
|
|
||||||
- unknown
|
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.windows
|
entity_id: binary_sensor.windows
|
||||||
@ -1620,13 +1618,13 @@ automation:
|
|||||||
who: everywhere
|
who: everywhere
|
||||||
type: weather
|
type: weather
|
||||||
message: "It is raining and there are windows open in the house. Please close them!"
|
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"
|
timeout: "00:15:00"
|
||||||
continue_on_timeout: true
|
continue_on_timeout: true
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- 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:
|
sequence:
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
@ -1641,7 +1639,7 @@ automation:
|
|||||||
message: "Windows are now closed. Thank you, and enjoy your dry house."
|
message: "Windows are now closed. Thank you, and enjoy your dry house."
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ is_state('sensor.pirateweather_precip','none') }}"
|
value_template: "{{ is_state('binary_sensor.raining_bayesian','none') }}"
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.text_notify
|
- service: script.text_notify
|
||||||
data:
|
data:
|
||||||
|
@ -74,7 +74,6 @@
|
|||||||
] | random }}
|
] | random }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ [
|
{{ [
|
||||||
'Were you hoping for a delay or cancellation? Well too bad. School is on time today. ',
|
|
||||||
'I regret to inform you that your school is running on time today. ',
|
'I regret to inform you that your school is running on time today. ',
|
||||||
'My sensors detect that your school expects you at the usual time today. ',
|
'My sensors detect that your school expects you at the usual time today. ',
|
||||||
'Unfortunately, your school has not decided to embrace to power of sleep. They are running on time today. ',
|
'Unfortunately, your school has not decided to embrace to power of sleep. They are running on time today. ',
|
||||||
@ -89,6 +88,8 @@
|
|||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<s>School today starts at {{ input_datetime_read('input_datetime.kallen_school_day_start') }}</s>
|
<s>School today starts at {{ input_datetime_read('input_datetime.kallen_school_day_start') }}</s>
|
||||||
|
{% if is_state('binary_sensor.raining_bayesian','on') %}
|
||||||
|
It appears to be raining right now, so you might get wet on your way to school.
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
||||||
Today, you will be picked up from school by {{ states('input_text.kallen_pickup') }}.
|
Today, you will be picked up from school by {{ states('input_text.kallen_pickup') }}.
|
||||||
{% elif is_state('input_boolean.work_today','off') %}
|
{% elif is_state('input_boolean.work_today','off') %}
|
||||||
|
Reference in New Issue
Block a user