-
Notifications
You must be signed in to change notification settings - Fork 13
Alerts #25
Description
I was not able to get alerts because I'm either and idiot, need to root my phone or the newer android app no longer has the log file needed. So what I had to instead was go the long route. I had to connect my RT-1250 to Smart life on my phone. I then had to install blue stacks with an older version of smart life to get my localkey. I then had to open BSTeeaker so I could find the log file. I cannot go back to the recteq app or my localkey will change. Alerts were easy and I actually like them better in home assistant. Now if I want to I can turn on my dinning room chandelier when my meat probe reaches target temp. lol
Here is how I did it.
1st. follow the setup outlined here for your probe status sensor but use the code bellow.
#Sensor for the smoker
- platform: template
sensors:
smoker_status:
value_template: >
{% if states('climate.smoker') == 'off' == 'unavailable' -%}
undefined
{% else %}
{% set target = states('sensor.smoker_target_temperature')|round %}
{% set actual = states('sensor.smoker_actual_temperature')|round %}
{% set offset = actual - target %}
{% if offset > 50 %}Way Over Temp!
{% elif offset > 20 %}Over Temp!
{% elif offset > -5 %}At Target
{% elif offset > -20 %}Approaching...
{% else %}Waiting...{% endif %}
{%- endif %}
#Sensor for probe A
smoker_probe_a_status:
value_template: >
{% if states('climate.smoker') == 'off' or states('sensor.smoker_probe_a_temperature') == 'unavailable' -%}
undefined
{% else %}
{% set target = states('input_number.smoker_probe_a_target')|round %}
{% set actual = states('sensor.smoker_probe_a_temperature')|round %}
{% set offset = actual - target %}
{% if offset > 5 %}Over Temp!
{% elif offset > -5 %}At Target
{% elif offset > -15 %}Approaching...
{% else %}Waiting...{% endif %}
{%- endif %}
#Sensor for probe B
smoker_probe_b_status:
value_template: >
{% if states('climate.smoker') == 'off' or states('sensor.smoker_probe_b_temperature') == 'unavailable' -%}
undefined
{% else %}
{% set target = states('input_number.smoker_probe_b_target')|round %}
{% set actual = states('sensor.smoker_probe_b_temperature')|round %}
{% set offset = actual - target %}
{% if offset > 5 %}Over Temp!
{% elif offset > -5 %}At Target
{% elif offset > -15 %}Approaching...
{% else %}Waiting...{% endif %}
{%- endif %}
2nd. Create an automation yaml file and add the following. This will send an alert to any phone using home assistant for both probes and the smoker itself. change notify.notify to your phone entity and you will be the only one to get the alert.
#Alerts when smoker target status reached
- id: smoker_target_status
alias: Smoker Target Status
trigger:
platform: state
entity_id: sensor.smoker_status
to:
- 'Approaching...'
- 'At Target'
- 'Over Temp!'
action:
service: notify.notify
data:
message: "Smoker is {{states('sensor.smoker_status')}}."
title: "Smoker"
data:
channel: "smoker"
timeout: 60
#Alert when probes target status reached
#Probe A
- id: smoker_probe_a_target_status
alias: Smoker Probe A Target Status
trigger:
platform: state
entity_id: sensor.smoker_probe_a_status
to:
- 'Approaching...'
- 'At Target'
- 'Over Temp!'
action:
service: notify.notify
data:
message: "probe A is {{states('sensor.smoker_probe_a_status')}}."
title: "Probe A"
data:
channel: "probe"
timeout: 60
#Probe B
- id: smoker_probe_b_target_status
alias: Smoker Probe B Target Status
trigger:
platform: state
entity_id: sensor.smoker_probe_b_status
to:
- 'Approaching...'
- 'At Target'
- 'Over Temp!'
action:
service: notify.notify
data:
message: "probe B is {{states('sensor.smoker_probe_b_status')}}."
title: "Probe B"
data:
channel: "probe"
timeout: 60
#Alerts when smoker target status way under or over
#Way under
- id: smoker_target_status_way_under
alias: Smoker Target Status Way Under
trigger:
platform: state
entity_id: sensor.smoker_status
from: 'Approaching...'
to: 'Waiting...'
action:
service: notify.notify
data:
message: "Possibly out of fuel. Smoker is {{states('sensor.smoker_status')}}."
title: "Smoker Emergency!!!"
data:
channel: "Emergency!"
#Way over
- id: smoker_target_status_way_over
alias: Smoker Target Status Way Over
trigger:
platform: state
entity_id: sensor.smoker_status
from: 'Over Temp!'
to: 'Way Over Temp!'
action:
service: notify.notify
data:
message: "Possibly Fire!!! Smoker is {{states('sensor.smoker_status')}}."
title: "Smoker Emergency!!!"
data:
channel: "Emergency!"