Hi everybody,
I used to have influxdb
set up like this
influxdb:
host: !secret influxdb_host
port: !secret influxdb_host
database: !secret influxdb_database
username: !secret influxdb_username
password: !secret influxdb_password
ssl: false
verify_ssl: false
max_retries: 3
default_measurement: state
include:
entities:
# (...)
domains:
# (...)
tags:
instance: prod
source: hass
This does exactly what it should for, let’s say binary_sensor
/ input_boolean
entities. Their status changes, it gets logged. However, when I have something like sensor.temperature_printer
(in this case, a DS18B20
on ESPHome
), the state might change by the minute (or even 6 times per minute or so), which generates a lot of data.
Is there a way to limit this? I am looking for something in the likes of
# (...)
include:
entities:
- entity: sensor.tempearature_printer
interval: 2m # / 120s
only_on_change: true
This is arbitrary yaml, but what I mean is: for entity sensor.temperature_printer
log value every 2m
; if value has not changed, don’t log it (otherwise do log it).
Prior to ESPHome, I had every single sensor integrated via zigbee2mqtt
, so I could just let node-red
take care of this; however, I don’t think it is the best solution to generate automations to send changes from the ESPHome entities to mqtt
just so that node-red
can work with them. There ought to be a better solution. Is there and I just missed it?
Thank you for your ideas