Skip to content
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

New Home Assistant select entities send invalid values #8078

Closed
frenck opened this issue Jul 19, 2021 · 4 comments
Closed

New Home Assistant select entities send invalid values #8078

frenck opened this issue Jul 19, 2021 · 4 comments
Labels
problem Something isn't working

Comments

@frenck
Copy link
Contributor

frenck commented Jul 19, 2021

What happened

Home Assistant reports warnings for select entities provided/created by Zigbee2MQTT.

Introduced by #7980

What did you expect to happen

No to have warnings in my logs

How to reproduce it (minimal and precise)

Have an integration that produces an select entity.

Debug info

Zigbee2MQTT version: 1.20.0-dev commit: 46e2a77
Adapter hardware: Conbee II
Adapter firmware version: 0x26660700

Additional information

image

@ruifung
Copy link
Contributor

ruifung commented Jul 20, 2021

This seems to be because Z2M is publishing state attribute as null until it knows a state, so it's None in home assistant.

I'm not quite sure how to get around this honestly. It's not like an assumption can be made of the default state of an enum expose, and None shouldn't be specified as a valid value because then it'll appear in a dropdown.

image
image

@frenck
Copy link
Contributor Author

frenck commented Jul 20, 2021

Well at this point, it defined possible values and next set a value that isn't possible according to the list provided by z2m... 🤷

@frenck
Copy link
Contributor Author

frenck commented Jul 20, 2021

Hmm... actually, this might be a bug in the MQTT select entity @ Home Assistant...

Setting a None (== STATE_UNKNOWN) is actually valid for an integration to do, however, should not be accepted as user input from a service call @ Home Assistant.

@frenck
Copy link
Contributor Author

frenck commented Jul 21, 2021

Fixed upstream!

@frenck frenck closed this as completed Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants