ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
606 stars 141 forks source link

Add config option for "expire_after" #154

Open Cupmar opened 2 years ago

Cupmar commented 2 years ago

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:

ThomDietrich commented 2 years ago

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

https://github.com/ThomDietrich/miflora-mqtt-daemon/pull/149#issuecomment-963528223=

ThomDietrich commented 1 year ago

Did you test this?