#Trying to get a warning message if a temp sensor is too high and keep repeating the warning.

1 messages · Page 1 of 1 (latest)

jovial sundial
#

I would like to have it check the sensor for when it not only crosses but also is above the value 10. Then to keep sending me warning messages until its below.

description: Announces when the temperature of the fridge is too high
triggers:
  - entity_id: sensor.fridge_temp_meter_XXXX_temperature
    above: "10"
    for: "00:00:10"
    trigger: numeric_state
conditions:
  - condition: numeric_state
    entity_id: sensor.fridge_temp_meter_XXXX_temperature
    above: 10
actions:
   - action: browser_mod.popup
    metadata: {}
    data:
      dismissable: true
      autoclose: false
      allow_nested_more_info: true
      browser_id:
        - XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      content: The fridge door may be open!
      title: Warning Fridge Temperature is High
worldly fernBOT
#

To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.

west robin
#

You could have the automation trigger on every state change of the temp sensor, or you could set up a time pattern trigger (and in both cases, keep the condition you have)

jovial sundial
#

when i try and edit post it just goes ot the post title....

west robin
#

The first option might result in tons of notifications, so you could add a delay to the end of the action for whatever you'd want the cooldown to be and change the automation mode to single

west robin
jovial sundial
#

Done, I want it to notify me every 30 seconds and then allow me to disable it. So as an automation I can disable it. But hwo to get it to recheck. Yes I could get it trigger to do it on a state change. let me test that.

#

Actually ill try the time pattern first

#

time pattern set at 30 seconds. Works great

#

So this will repeat every 30 second, when it meets the condition, until i disable the automation

#

Now if i wanted to add in a dashboard toggle? Would that be a toggle helper linked to the automation? (havent played with HA for a while)

west robin
#

You could add the automation entity itself to the dashboard

flat depot
#

You need to have 2 triggers in your automation. 1st - time pattern sensor /30 sec, 2nd - when sensor crosses value 10.

west robin
#

assuming you want to turn the automation itself on and off

flat depot
#

Assign them own IDs

west robin
flat depot
#

2nd trigger will set helper switch ON

west robin
#

yeah that would be a good idea to include as opposed to setting up another automation to turn on this automation

flat depot
#

automation itself will always in working state

#

both triggers work in one common automation]\

#

time pattern trigger checks heper switch state.

#

sensor trigger sets helper On iv > 10

#

if > 10

west robin
# jovial sundial time pattern set at 30 seconds. Works great

time pattern trigger set to /30 will only trigger once per minute (since that will trigger when the seconds value is divisible by 30). you would need two separate time pattern triggers to actually trigger every 30 seconds (one with seconds: 0 and another with seconds: 30)

jovial sundial
#

ive created a helper toggle and added it to the dashboard. So scrap that and just add the automation direct?

west robin
#

unless you're turning the automation on/off with another automation, you can do what pyzone suggested

flat depot
#

you can manually set ANY state for helper switch

jovial sundial
#

ill scrap the helper toggle

west robin
#

are you turning the automation on/off with another automation though?

flat depot
#

if you don't need this auto anymore - then you OFF auto where you can

west robin
#

if not, you'd want to do what pyzone is suggesting

jovial sundial
west robin
#

then yeah, what pyzone said would be a good idea

jovial sundial
#

I just want to turn it off and on as I know the door is left open. I then turn it off until the temp has gone back to normal.

flat depot
#

i have made a many autos like that

jovial sundial
jovial sundial
#

whats pyzone suggestiing?

#

I have two triggers, one for above 10 and 1 for every 30 sec (1 min)

flat depot
#

you need to assign individual IDs to each trigger

#

3 dots at right

jovial sundial
#

Is that in the UI or YAML?

flat depot
#

ui

jovial sundial
#

Trigger ID? had no idea that was there

flat depot
#

yes it's here

#

type any letters/ better do so to understand yourself

jovial sundial
#

as in a reference to the trigger like an entity name?

#

eg "trigger_fridge_temp_Above_10"

flat depot
#

you mean how to name it ?

jovial sundial
#

no I mean why am I renaming the ID and not the trigger?

#

ie why ID and not name?

flat depot
#

rename is for visible heading in ui tabs

jovial sundial
#

ah ok

flat depot
#

id is for use in ciondition checking

jovial sundial
#

oh , what would you suggest I name it?

flat depot
#

try self-explaining shorts .

#

1st action in auto must be like

#

want to show a picture but don't know how to do iy here

jovial sundial
#

just copy and paste with a screenshot

#

screentshot, paste into chat

#

printscreen key (might need to be enabled in windows settings)

flat depot
jovial sundial
#

ah yes, i see,

flat depot
#

you'll have 2

#

see "triggered by init" : it's trigger ID

jovial sundial
#

yup thanks

#

Thanks everyone, job done!

#

Fridge now cooling from 21C

#

Ah one thing

#

What if I do the same for the freezer but its a negative number?

#

Is it above or below -19?

flat depot
#

i think no diff

jovial sundial
#

above -19 is -20 mathematically....

flat depot
#

cooler is below

#

above -19 is -18

jovial sundial
#

right but is it the below value or above value?

#

ah true

inner crypt
#

Hi All
I'm building a temperature probe by ESP Home with DS18B20 probes. I've created an automation to trigger an alarm when the freezer temperature rises to -16°C.
I've programmed the alarm to repeat every 15 minutes if it's not turned off. This is to force a visual check of any food that needs defrosting.
The temperature probe records temperatures regularly, but the alarm does not go off because the probe is above the threshold.
I found here a discussion that seems like my problem.... did you found some solution to trigger automation?
below my code:

description: Invia notifiche ogni 15 minuti se la temperatura supera i -16°C
triggers:
  - entity_id: sensor.sonda_tempconcelatorecantina_congelatore
    above: -16
    trigger: numeric_state
conditions:
  - condition: state
    entity_id: input_boolean.allarme_congelatore_attivo
    state: "off"
actions:
  - target:
      entity_id: input_boolean.allarme_congelatore_attivo
    action: input_boolean.turn_on
  - repeat:
      until:
        - condition: state
          entity_id: input_boolean.allarme_congelatore_attivo
          state: "off"
      sequence:
        - data:
            title: :warning: ALLARME TEMPERATURA CONGELATORE
            message: La temperatura è sopra i -16°C. Controllare!
            data:
              push:
                sound:
                  name: default
                  critical: 1
                  volume: 1
          action: notify.notify
        - delay:
            minutes: 15
mode: single
#

I also checked the off state of the entity input_boolean.allarme_congelatore_attivo
This entity its used to acknowledge the alarm manually, in this way who manage the alarm can reset it. But like I wrote above my automation doesn't work, I don't understand where is the problem in the code.
Suggestion?

thorn ledge
#

Your automation will trigger when the temperature transitions from below -16 to above -16. If you created the automation when the temperature was already warmer than -16 it won’t fire.

thorn ledge
#

Another suggestion, unrelated to your issue, is to avoid long-running automations. Reloading automations or restarting HA will stop the automation, and it won’t restart. I suggest something like this:

description: Invia notifiche ogni 15 minuti se la temperatura supera i -16°C
triggers:
  - entity_id: sensor.sonda_tempconcelatorecantina_congelatore
    above: -16
    trigger: numeric_state
  - trigger: state
    entity_id: sensor.sonda_tempconcelatorecantina_congelatore
    to: "on"
    for:
      minutes: 15
conditions: []
actions:
  - target:
      entity_id: input_boolean.allarme_congelatore_attivo
    action: input_boolean.turn_off
  - target:
      entity_id: input_boolean.allarme_congelatore_attivo
    action: input_boolean.turn_on
  - data:
      title: ":warning: ALLARME TEMPERATURA CONGELATORE"
      message: La temperatura è sopra i -16°C. Controllare!
      data:
        push:
          sound:
            name: default
            critical: 1
            volume: 1
    action: notify.notify
mode: single