-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding additional information to the Home Assistant MQTT Auto Discovery messages #248
Comments
As I mentioned, I don't use either MQTT or Home Assistant -- but at one point I set up a HAST instance with the intent of trying to get it working with TiltBridge. Unfortunately, Home Assistant Autodiscovery wasn't (isn't?) the best documented at the time, and so I ended up giving up. While I can't promise to get this one fixed soon, I'll give it a shot when I have some time. |
FYI: With the following manual configuration (YAML/JSON) it was possible to choose the display of the sensor status according to the HA options (screenshot). I hope it helps when thinking about how to integrate this into the code. mqtt.yaml
JSON (yaml converted)
|
The YAML here is incredibly helpful, as I think I understand how it maps to the sensor configuration payloads that TiltBridge is sending (and where the differences are) which is a big part of the trouble I was facing. In the device announcements we're abbreviating most of the keys, but mapping them shouldn't be an issue. With the changes that I made for #247 I think that adding (at least some of) the |
Since I'm not familiar with the abbreviation rules, I operated with the full names 😉
I think as long as the existing definitions are not changed and only new lines are added, this should not be a problem. |
If the additions are to be made, then it would probably also be advisable to set the "unique_id" as recommended, wouldn't it? |
Yes, but this would definitely be a breaking change, and thus will require a major version increase. Thankfully, I'm likely to do one of those in the not-too-distant future anyways, so I've referenced this in a new issue and will try to release it at the same time as I do #193 |
The aim is to optimize the visualization of tilt devices and sensor data in the Home Assistant by modifying the auto discovery messages.
Initial situation using the "Tilt Blue" example:
Suggestion:
1) Add an attribute to the sensor status as secondary information, e.g.: the timestamp
References found to:
state.last_updated
&state.last_changed
If the sensor now has "temperature" as the status and, for example, the timestamp as an attribute, an update with the same temperature but a different timestamp will update last_updated but not last_changed, as only the attribute has been updated.
The same would of course also apply to the "Specific density".
Here is an example of the effect in the entity card
2) Additional information about the device to which this sensor belongs
References found for configuration variable: device
Could be of interest IMHO:
The text was updated successfully, but these errors were encountered: