Simple set the threshold temperature and select the entities of the temperature sensors to monitor.
Than add a action and ready!
blueprint:
name: Fire detection based on temperature sensors
description: Detect if there is a fire based on the temperature
domain: automation
input:
threshold:
name: Fire temperature level threshold
description: The temperature thats not normal only posible when there is a fire.
default: 45
selector:
number:
min: 45.0
max: 100.0
unit_of_measurement: "Ā°C"
mode: slider
step: 1.0
include:
name: Included Sensors
description: Temperature sensors to include from detection. Only
entities are supported, devices must be expanded!
default:
entity_id: []
selector:
target:
entity:
device_class: temperature
actions:
name: Actions
description:
Notifications or similar to be run. {{sensors}} is replaced with
the names of sensors with there current exceeded temperature.
selector:
action: {}
source_url: https://gist.github.com/RoyOpstals/1b6e06feb2e828b46b716ad86a1495e1
variables:
threshold: !input "threshold"
include: !input "include"
sensors:
"{% set result = namespace(sensors=[]) %} {% for state in states.sensor\
\ | selectattr('attributes.device_class', '==', 'temperature') %}\n {% if 0 <= state.state\
\ | int(-1) > threshold | int and state.entity_id in include.entity_id %}\n\
\ {% set result.sensors = result.sensors + [state.name ~ ' (' ~ state.state\
\ ~ ' Ā°C)'] %}\n {% endif %}\n{% endfor %} {% for state in states.binary_sensor\
\ | selectattr('attributes.device_class', '==', 'temperature') | selectattr('state',\
\ '==', 'on') %}\n {% if state.entity_id in include.entity_id %}\n {%\
\ set result.sensors = result.sensors + [state.name] %}\n {% endif %}\n{% endfor\
\ %} {{result.sensors|join(', ')}}"
trigger:
- platform: time_pattern
seconds: /30
condition:
- "{{ sensors != '' }}"
action:
- choose: []
default: !input "actions"
mode: single
First of all I want to thank you for this good idea. I have a bunch of temperature sensors since months or years now and I never had the idea of using it to detect fire. Great idea
But Iām pretty new (less than a week) on home assistant after years of Jeedom and Iām not an expert at all. So when I tried to use {{sensors}} to use in tts to audibly alert which device triggered the alarm the tts read literally āsensorsā
So how long in to an house fire does it have to go before reaching 45 degrees?
This is a very unconventional method of detecting fire, that is why I ask.
Generally smoke detection is used since that is the first sign of a fire, temperature rising at height of temperature sensors might take a while, and add to this a time pattern trigger which could delay it even more.
Iām skeptical of this to be honest.
But if you know of any tests of this as a method that you can link to then please do, it would be interesting to read about it.
I sure there will be somebody here who works in the fire service. I saw a video at work and was surprised how quickly the temp will rise above 100 degrees C in a room with the door closed. You may not be able to tell from just outside. I donāt think you would use this instead of smoke alarms but it could add life saving seconds. I came home and set up a similar notification system setting off buzzers and alerting all media devices and sending alert to Telegram.
I believe there are two main factors in those kind of videos.
The closed door as you mention, but also I believe (donāt know for sure) they place the temperature sensor where it gets hot to create drama in the video.
It could be that this is a very valid way of doing it but it would be nice to know for sure.
This is never intended to replace smoke detectors, but to perhaps give you a few extra life saving seconds. The 45 degrees has not been scientifically recorded, but is a temperature that normally does not occur at my location. If this is the case, I would like to know because it could possibly be due to fire. Of course you donāt have to use it.
Hi @Hellis81 As a firefighter myelf i can say you it works. Moreover heat detector are actualy sell on the market. They are prefered in room where non dangerous smoke can be product without a life fire such as kitchen where smoke detector can be triger for nothing. But you are right smoke detectors are prefered where there is no risk of false alarm. The thing is itās better to have a detector who maybe will trigger a litle bit later than a smoke detector without battery becouse somebody was annoyed of false alarm. From my experience heat detector sell on the market (and not on aliexpress, wish abd so on) perform well and could definitly safe life. However i did litle bit test with aqara temperature sensor and the blueprint work well but i see it as an added feature who can act as a backup of a smoke detector. But after all itās better than nothing. I obviously canāt garenty that it will work on real fire since it can happen that the sensor will be burn die befor sendind the temperature.
thanks. I was trying to read it loud on my sonos and google cast with TTS but it seems that TSS read it literaly. I tried to sens it via telegram and there the sensor name and temperature is well prompt. Thanks for your help.
Nice work, @RoyOps. I will use this (or a variation of this blueprint).
One questionā¦ As you are using device_class == temperature to filter out other sensors, why donāt you ask for āexclusionsā instead of āinclusionsā.
I mean, the automation will check all the sensors, except by one you exclude. It would be much easier to setup for people with dozens of sensors at home and will reduce the chance of a sensor to be left behind.
I did not know there was heat detectors sold as fire alarms. Good to know.
Either way I still believe the blueprint has a flaw that it uses timepattern and not just state based.
Or perhaps even better a derivative of the temperature, but this probably could trigger if the sun hits the sensor.
But when you have your training, is there any possibility that you could ask for a temperature sensor to be placed in the opposite side of the room at 1-ish meter height to test the scenario compared to a normal smoke detector?
Without doubt I understand that if we are comparing nothing against this blueprint then obviously the blueprint is better, but Iām just curious how it compares.
Is it faster or slower than a smoke detector placed correctly, if slower, how much slower?
Iām obviously not as qualified as you in this area, but as I have understood the difference between now and one minute later is perhaps a fire that you can extinguish and just get out as fast as possible.
Thatās a good question, in my case I used include because then I am better in control. I have a lot of temperature sensors created by weather forecast and sensor outside the house in the sun. Then I had to exclude all them. Using include is more explicit.
I donāt see how can i do this test since it mean me going to our training facilities with all my domotic including my 4 bay NAS. But i have tested this script by heating the sensor with a hair dryer and it trigered whithin seconds. I would say less than 10 seconds. From my knowledge (i canāt speak about experience since alarme are usualy trigered since minutes or already dying from bunr when we arrive on scene) heat detectors are prety much as slow as that.
You donāt have to exclude the external sensors, as hopefully they will never trigger (or if that happens it mean you might have a fire coming from the outside).
But you might be rightā¦ Exclude the deviceās internal temperature sensors, CPU temperature, phones temperatures, etc. can be a nightmare.
I didnāt mean your sensors. I meant (assumed) the fire station has some sensors, probably wired connected to something.
It was just a guess. Perhaps this does not exist on each fire station but more a āscienceā fire station.
Anyone consider the fact thatā¦ I might be good to get a text letting you know your home is on fireā¦when your not at home? Dunno about yall butā¦ I can hear my smoke alarm when Iām out to dinner or at the arena for a hockey matchš.
Just sayingš
@RoyOps this is a really useful idea for a blueprint! Any chance youād be willing to tweak it to also support low temperature threshold as well (e.g. heating has failed when away?) Iāve searched for an existing blueprint for this and canāt seem to find any.
Hi Some-guy,
I made a blueprint that should do what you want. just changed the > threshold into < threshold and changed some text.
You can find it here: Low temperature detection Ā· GitHub
blueprint:
name: Low temperature detection
description: Detect if there the temperature is too lo on any sensor
domain: automation
input:
threshold:
name: Temperature level threshold
description: When the temerature goes belwo this threshold, the automation is triggerd.
default: 10
selector:
number:
min: -45.0
max: 100.0
unit_of_measurement: "Ā°C"
mode: slider
step: 1.0
include:
name: Included Sensors
description: Temperature sensors to include from detection. Only
entities are supported, devices must be expanded!
default:
entity_id: []
selector:
target:
entity:
device_class: temperature
actions:
name: Actions
description:
Notifications or similar to be run. {{sensors}} is replaced with
the names of sensors with there current exceeded temperature.
selector:
action: {}
source_url: https://gist.github.com/RoyOpstals/014c41d7bf996e625718f66ca05fc156
variables:
threshold: !input "threshold"
include: !input "include"
sensors:
"{% set result = namespace(sensors=[]) %} {% for state in states.sensor\
\ | selectattr('attributes.device_class', '==', 'temperature') %}\n {% if 0 <= state.state\
\ | int(-1) < threshold | int and state.entity_id in include.entity_id %}\n\
\ {% set result.sensors = result.sensors + [state.name ~ ' (' ~ state.state\
\ ~ ' Ā°C)'] %}\n {% endif %}\n{% endfor %} {% for state in states.binary_sensor\
\ | selectattr('attributes.device_class', '==', 'temperature') | selectattr('state',\
\ '==', 'on') %}\n {% if state.entity_id in include.entity_id %}\n {%\
\ set result.sensors = result.sensors + [state.name] %}\n {% endif %}\n{% endfor\
\ %} {{result.sensors|join(', ')}}"
trigger:
- platform: time_pattern
seconds: /30
condition:
- "{{ sensors != '' }}"
action:
- choose: []
default: !input "actions"
mode: single