Replies: 4 comments
-
I am not a C++ programmer by trade (Python mostly), but I did fork and add this to the HASensor class (which is the place I need it for the project I'm working on). It looks like it would "just" be a matter of adding these same changes to every type. I believe if you put in something invalid, HA will just ignore it, so I didn't do any checking to make sure it was either empty, I have only checked to make sure this compiles. I am going to see tomorrow if I can get an ESP32 setup so I can dump a sketch on it to see if it actually generates the needed MQTT info. |
Beta Was this translation helpful? Give feedback.
-
It works. There are two other files I forgot I had to update: Once the actual hardware I'm going to use arrives, I'm going to test this for a bit. Then I may go ahead and do the work for the other sensors and submit a pull request. |
Beta Was this translation helpful? Give feedback.
-
@pkscout Feel free to make pull request. I'm happy to add this feature. |
Beta Was this translation helpful? Give feedback.
-
Done. I don't think there are any huge problems with what I did, but I'm a Python guy trying to live in a C++ world. '-) |
Beta Was this translation helpful? Give feedback.
-
The HA MQTT Sensor documentation includes information on setting a sensor's
entity_cateogry
.https://www.home-assistant.io/integrations/sensor.mqtt/#entity_category
I'm not seeing any way to set that using this library, and it would be nice to be able to do that.
Beta Was this translation helpful? Give feedback.
All reactions