-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #524 from kylegordon/stove-alerts
Combine into package. Voice alerts
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
sensor: | ||
- platform: template | ||
sensors: | ||
stove_sensor: | ||
friendly_name: Hwam Stove | ||
icon_template: > | ||
{%- set phase = states.sensor.phase_living_room.state %} | ||
{%- set refuel = states.binary_sensor.refill_alarm_living_room.state %} | ||
{%- if phase == 'Burn' %} | ||
mdi:fire | ||
{%- elif phase == 'Standby' %} | ||
mdi:power | ||
{%- elif phase == 'Ignition' %} | ||
mdi:circle-outline | ||
{%- elif refuel == 'on' %} | ||
mdi:autorenew | ||
{%- else -%} | ||
mdi:blur | ||
{%- endif %} | ||
value_template: > | ||
{%- set phase = states.sensor.phase_living_room.state %} | ||
{%- set temp = states.sensor.stove_temperature_living_room.state %} | ||
{%- set timer = states.sensor.time_to_new_fire_wood_living_room.state %} | ||
{%- set refuel = states.binary_sensor.refill_alarm_living_room.state %} | ||
{%- if phase == 'Burn' %} | ||
{{ temp }} °C | ||
{%- elif phase == 'Standby' %} | ||
Standby | ||
{%- elif phase == 'Ignition' %} | ||
Start | ||
{%- elif refuel == 'on' %} | ||
Refuel now! | ||
{%- else -%} | ||
Refuel in | ||
{{ timer }} | ||
{%- endif %} | ||
automation: | ||
- alias: More wood | ||
unique_id: time_to_new_fire_wood | ||
trigger: | ||
- platform: state | ||
entity_id: binary_sensor.refill_alarm_living_room | ||
from: "off" | ||
to: "on" | ||
condition: | ||
- condition: not | ||
conditions: | ||
- condition: state | ||
entity_id: sensor.time_of_day | ||
state: "Night" | ||
action: | ||
- service: notify.alexa_media | ||
data_template: | ||
target: | ||
- media_player.living_room | ||
data: | ||
type: announce | ||
# method: all | ||
message: "The stove requires more wood." | ||
- service: notify.mobile_app_nothing_phone_1 | ||
data: | ||
title: "More wood needed!" | ||
message: > | ||
The stove is running low on wood. Refuel now. | ||
- service: script.tweet_engine | ||
data_template: | ||
tweet: > | ||
{{ [ | ||
"The stove is running low on fuel!", | ||
"Time to get wood..." | ||
] | random + " https://amzn.to/3HO2IDZ" }} |