-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Read/write exposed enums are now discovered as MQTT Select entities #7980
Conversation
Looks good, I will merge this after the next z2m release in dev (1 August), then it will be included in the 1 September release. This gives people some time to update HA. |
That, and this is likely to be breaking for people that have setups that depend on reading the state of some enum property via a sensor (does Z2M clean up old discovery messages...?) |
Good point, it will indeed. Might be better to return both configs for now, can you modify this function to return an array instead of one |
…n home assistant 2021.7.
…ing sensor, for compatibility. Also, the sensor will be disabled by default for new entities, shouldn't effect existing installations.
2659824
to
a422932
Compare
With this change, I don't think you need to wait until september for people to update as the old sensor behavior has been restored, albeit with the enabled_by_default flag set to false to disable new sensor entities by default if select entities are present. Use cases:
|
Yes you are right, thanks! |
Running this one dev, one comment I have: These entities are not really "common". As in, they can be useful, but probably most people won't use them in their automation or dashboards in general. Therefore, it is recommended to send a disabled by default in Home Assistant. This allows a user to enable them when needed, but not overwhelm the user with entities they do not need or pollute the database unneeded. Can we adjust this for this feature before release it to the public? |
Additionally, opened issue #8078, as this PR is generating warnings as it sends in unexpected/invalid values. |
Extracted my above listed comment/report into its own issue here: #8083 |
In Home Assistant 2021.7, a new type of entity (select) was added and can now be configured via MQTT Discovery.
This change makes enums exposed with STATE and SET to be discovered as select entities in home assistant in addition to a sensor (that is a disabled entity by default).
Requires at least home assistant 2021.7 for select entities to work.