Closed nuessgens closed 1 month ago
Hey there @emontnemery, @jbouwh, @bdraco, mind taking a look at this issue as it has been labeled with an integration (mqtt
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
mqtt documentation mqtt source (message by IssueLinks)
https://github.com/home-assistant/core/pull/123248 will add support for this. That it is not supported yet is not an issue though, it is a feature request. So I am going to close this as it is not an issue.
Tanks for the quick reply.
You are totally right: this was rather a feature request.
Regarding the pull-request: amazing! that was lightning fast 😎 Looking forward to the next release ;-)
The problem
I tried building sensors which are automatically discovered via the MQTT discovery. I have the usecase for enum / limited set of (non-numeric) states (e.g. presence in 'free', 'in-call', 'off' or wind-direction in 'N', 'NW' etc.)
It seems that this is not supported (at least for MQTT sensors; because e.g. the charger_type of the companion app exactly this is done). Unfortunately therefore all the visual editors provide no drop-down with possible values of such entities.
I was assuming that with #89391 device_class enum was introduced for MQTT sensors
What version of Home Assistant Core has the issue?
core-2024.7.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
MQTT sensor (autodiscovery)
Link to integration documentation on our website
https://www.home-assistant.io/integrations/sensor.mqtt/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
Here is a config-example for my "presence" / busylight use-case
MQTT discovery msg: Topic:
homeassistant/sensor/host1/msteams/config
Payload:MQTT state msg: Topic:
busylight_msteams/host1/state
Payload:But in the Developer Tools > States Entity it just shows Entity:
sensor.host1_busylight_msteams_state
State:free
State attributes: