Template binary sensor for non HA device failure

Hi,

I have question if anybody can help me to make binary sensor, which will detect some hardware failure, which is not connected to HA, but can be detected based on other devices.

So, we are checking binary sensor:
binary_sensor.seltron_r1
(marked with red color)
And temperature sensor:
sensor.centralna_t3
(marked with blue color)

image

The goal is to make automation, which will notify me in case that newly created template binary sensor is set to true.

Condition is that in case that binary sensor “binary_sensor.seltron_r1” is true for 4 minutes, that then we expect that temperature sensor “sensor.centralna_t3” will get temperature rise from current temperature to at least 20 degrees + after 20 minutes.
In case that temperature sensor do not go up in 20 minutes, then template binary sensor must be set to true, and other automation will notify me via telegram for that event.

Can anybody help me how to store current temperature to the some temporary sensor and compare it after 20 minutes.

Thank you…

Would this meet your requirements?

When binary_sensor.seltron_r1 is on for 4 minutes, wait 20 minutes, then check if sensor.centralna_t3 is greater than 20. If it is not then send a notification.

Or is this what you want?

When binary_sensor.seltron_r1 is on for 4 minutes, record the temperature of sensor.centralna_t3, wait 20 minutes, then check if sensor.centralna_t3 is greater than the recorded temperature plus 20. If it is not then send a notification.

I resolved it by:

#################################################################
#
# AVTOMATIZACIJA - CENTRALNA
#
#################################################################
 
# R1 napaka
- id: '1700'
  alias: CENTRALNA - R1 napaka
  trigger:
  - platform: state
    entity_id: binary_sensor.seltron_r1
    to: 'on'
    for:
      hours: 0
      minutes: 3
      seconds: 0
  condition:
    condition: or
    conditions:
    - condition: state
      entity_id: binary_sensor.seltron_r5
      state: 'off'
      for:
        hours: 0
        minutes: 20
        seconds: 0
    - condition: state
      entity_id: binary_sensor.seltron_r2
      state: 'off'
      for:
        hours: 0
        minutes: 20
        seconds: 0
  action:
  - delay: 00:20:00
  - condition: or
    conditions:
     - condition: state
       entity_id: binary_sensor.seltron_r5
       state: 'off'
       for:
         hours: 0
         minutes: 30
         seconds: 0
     - condition: state
       entity_id: binary_sensor.seltron_r2
       state: 'off'
       for:
         hours: 0
         minutes: 30
         seconds: 0
  - service: input_boolean.turn_on
    entity_id: input_boolean.centralna_r1_napaka
  - service: notify.simon_telegram
    data:
      title: ''
      message: ''
      data:
        photo:
        - file: /config/www/images/telegram/centralna_gorilec_napaka.png
          caption: "••• CENTRALNA •••
 
          R1 (gorilec) v napaki. Potrebno izvesti reset gorilca."
  mode: single

So, I did consider other sensors rather then temperature sensor…

Hi, my automation do not work correctly, so probably I will do indeed need your help…

I need:
When binary_sensor.seltron_r1 is on for 4 minutes, wait 20 minutes, then check if sensor.centralna_t3 or sensor.centralna_t4 is greater than 40. If both are bellow 40 then send a notification

I was interested in this topic 18 days ago but not now. Hopefully someone else can help you. Good luck.

Anybody know how to achive this?