ThomDietrich/miflora-mqtt-daemon

Add config option for "expire_after"

Cupmar opened this issue · 2 comments

On Homeassistant the following payload is received for the battery:
I would like that the sensors in homeassistant are longer available before their values are discarded:
Can "expire_after" be added to the config?

name: Elastica1 Battery
unique_id: c47c8d6c811c-battery
unit_of_measurement: '%'
device_class: battery
state_topic: miflora/sensor/elastica1/state
value_template: '{{ value_json.battery }}'
device:
identifiers:
- MiFlorac47c8d6c811c
connections:
- - mac
- c4:7c:8d:6c:81:1c
manufacturer: Xiaomi
name: Elastica1
model: MiFlora Plant Sensor (HHCCJCY01)
sw_version: 3.3.1
expire_after: '3600'
platform: mqtt

Hey! I agree with the idea but didn't test so far. Any feedback from your side?

#149 (comment)

Did you test this?