Comments (2)
Hey,
sounds reasonable to me. Could you please check the Home Assistant "MQTT Discovery" documentation and/or community forum for most conforming way to do this, then propose a PR? Thanks!
from miflora-mqtt-daemon.
So, I dug into this and creating the extra element in MQTT is simple enough however as I use the plant component in HA, this also needs to change to understand the new value and to write it to a sensor. All got to be too many dependencies so I have a half way house now of a template to check for any value change in the data coming back and use that. Not 100% perfect but it seems to generally report every update. I'll add an example template here for anyone else who searches for this:
epipremnum_last_updated:
friendly_name: "Epipremnum Last Updated"
unit_of_measurement: timestamp
icon_template: mdi:clock
value_template: >
{% set sensors = [
states.sensor.epipremnum_battery,
states.sensor.epipremnum_light,
states.sensor.epipremnum_moisture,
states.sensor.epipremnum_conductivity,
states.sensor.epipremnum_temperature]
|reject('none')|list %}
{% set target = sensors | map(attribute='last_updated') | max %}
{% set target = sensors | selectattr('last_updated', 'eq', target) | list | first %}
{{ target.last_updated }}
Closing this off for now.
from miflora-mqtt-daemon.
Related Issues (20)
- Its possible to change MAC address in MyFlora sensor? HOT 2
- Bluepy error after apt update && upgrade HOT 1
- Daemon connects and collects data but does not publish to openhab HOT 3
- `$ sudo hcitool lescan` - Input/Output error HOT 2
- Anyone with problems? ->Miflora Firmware 3.3.5 HOT 4
- Failed to retrieve data from Mi Flora sensor but `bluetoothctl` detects all data HOT 2
- Light measurement disturbed by flashing LED HOT 1
- Installation fails HOT 8
- Add config option for "expire_after" HOT 2
- running as service in python3.10 HOT 3
- Api changes in miflora break miflora-mqtt-daemon HOT 4
- Brightness value wrong HOT 6
- MQTT Push - Topic not case sensitive HOT 2
- Project dependencies may have API risk issues HOT 1
- Running on ESP32 HOT 1
- Change unit of light sensor from "lux" to "lx" HOT 1
- Support for Flower Care Max sensor?
- one sensor stopped answering, but works in the app HOT 2
- Error: The MAC address "..." seems to be in the wrong format. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miflora-mqtt-daemon.