Hello,
I have a contact sensor on my gas meter. It opens and closes every 0.01 m3 and adding 0.01 m3 to a counter in HA:
- id: '1639044086214'
alias: Gazomierz
description: ''
trigger:
- platform: state
entity_id: binary_sensor.gazomierz_contact
from: 'off'
to: 'on'
condition: []
action:
- service: counter.increment
target:
entity_id: counter.licznik_gazu
mode: single
Depending on heating type being currently used it updates with different speeds.
If house heating is on I usually get 0.01 m3 increasement every 80-90 seconds.
If water heating is on I usually get 0.01 m3 increasement every 30 seconds.
I would like to create a binary sensor or even 2 binary sensors that detects these kind of states.
So I need 3 states:
- No increcement for more than 120 seconds
- detect open/close every 90 seconds (that would turn on first binary sensor)
- detect open/close every 30 seconds (that would turn on second binary sensor)
I tried trend but it doesn’t work.
Any idea how to achieve this?