Home Assistant MQTT Discovery #73
LiamAkkerman
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
This project looks great. I have yet to receive a unit so I can not test anything yet though, so please take anything technical with a grain of salt. Thank you.
I was wondering if Home Assistant MQTT discovery could be implemented to work in conjunction with CAN to JSON interpreter - Filtring. I think it would greatly increase the ease of use for integrating with Home Assistant. No Node-RED would be required.
The steps required would be:
Add discovery message(s).
I suppose these could be sent after updating the JSON filtering settings.
Define
device_class
field.I can't think of the best way to accomplish this. I suppose a dropdown on the filter settings page with all relevant options for HA? Sensor option list, and binary sensor option list. Could also be left as
none
and users define it in HA.(Optional) Change the filtered JSON publish topic to HA's defaults.
A more HA topic would be
homeassistant/sensor/<device_id>/state
. The existing JSON payload fits the schema.But instead, the discovery message can define the state topic to be
wican/<device_id>/can/rx
, i.e. the current state topic.Not required but is an option. This would probably break existing integrations/flows if not an optional setting.
Add unit settings to the filtering page.
The unit each measurement is in can be defined in the discovery message. e.g. defining ambient temperature unit to be °C
This wouldn't be critical for functionality.
An example of a discovery message:
topic:
homeassistant/sensor/<device_id>/config
message:
Beta Was this translation helpful? Give feedback.
All reactions