#Temperature differential

1 messages · Page 1 of 1 (latest)

tropic halo
#

So I have a big door to my balcony and 2 climate sensors and a door sensor. I would like to give me a notification when the door is open for more than 15 minutes when the outside temperature is above 25 degrees AND the inside temperature is at least 1 degree lower.

Or everything the other way round so that I get a notification when its good to open the door. (Like Inside 27° outside 25°; door closed --> "Open the door"

I don't find a way to compare the two temperature sensors.

The notification sending works over the app or telegram (though still figuring out how to get the telegram bot sending messages to groups😅)

EDIT: Group notifications work now aswell

proper osprey
#

Pure in the UI it's unfortunately not possible to use a offset yet. You could use a template:

alias: Close door notification
mode: single
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.door
    to: "on"
    for:
      hours: 0
      minutes: 15
      seconds: 0
conditions:
  - condition: numeric_state
    entity_id: sensor.temperature_b
    above: 25
  - condition: template
    value_template: |-
      {% set a = 'sensor.temperature_a' %}
      {% set b = 'sensor.temperature_b' %}
      {{ has_value(a) and has_value(b) 
        and states(a)|float + 1 < states(b)|float
      }}
actions:
  - action: notify.mobile_app_phone
    metadata: {}
    data:
      message: Close the damn door!

With a being inside an b being outside temperature.

tropic halo
#

So - I know maybe stupid question: How could I send a message if the door is still open after e.g. 5 Minutes?

hollow gate
proper osprey
#

5 minutes after this another one?

alias: Close door notification
mode: single
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.door
    to: "on"
    for:
      hours: 0
      minutes: 15
      seconds: 0
    id: first
  - trigger: state
    entity_id:
      - binary_sensor.door
    to: "on"
    for:
      hours: 0
      minutes: 20
      seconds: 0
    id: second
conditions:
  - condition: numeric_state
    entity_id: sensor.temperature_b
    above: 25
  - condition: template
    value_template: |-
      {% set a = 'sensor.temperature_a' %}
      {% set b = 'sensor.temperature_b' %}
      {{ has_value(a) and has_value(b) 
        and states(a)|float + 1 < states(b)|float
      }}
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - first
        sequence:
          - action: notify.mobile_app_phone
            metadata: {}
            data:
              message: Close the door please!
    default:
      - action: notify.mobile_app_phone
        metadata: {}
        data:
          message: Close the damn door! NOW!
tropic halo