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

[mqtt][homeassistant] Set channel type to Number for some sensor components #6663

Closed
bodiroga opened this issue Dec 22, 2019 · 1 comment
Closed
Labels
enhancement An enhancement or new feature for an existing add-on

Comments

@bodiroga
Copy link

Hi guys!

Right now, the homeassistant binding defines all sensor components as String items (TextValue as defined by MQTT generic binding). As far as I know, we can not change it directly to NumberValue, because some sensor components can have discrete values, but we could use the "unit_of_measurement" variable to determine the magnitude of the reported information. Having a look at the mqtt messages sent by the sensor, I can see that the "value_template" information could also be used for this (value_json.temperature, value_json.humidity, value_json.battery, value_json.linkquality...).

What do you think?

Thanks for your work and best regards,

Aitor

@bodiroga bodiroga added the enhancement An enhancement or new feature for an existing add-on label Dec 22, 2019
@bodiroga
Copy link
Author

Thanks @jochen314 for implementing it! Closed by #6763.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

No branches or pull requests

1 participant