Skip to content

Commit

Permalink
Merge pull request #524 from kylegordon/stove-alerts
Browse files Browse the repository at this point in the history
Combine into package. Voice alerts
  • Loading branch information
kylegordon authored Feb 9, 2024
2 parents 40832b6 + 37f55a1 commit c216299
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions packages/stove.yaml
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" }}

0 comments on commit c216299

Please sign in to comment.