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

Sensor unit discovery for multi value sensor #130

Open
pawelka opened this issue Dec 5, 2021 · 0 comments
Open

Sensor unit discovery for multi value sensor #130

pawelka opened this issue Dec 5, 2021 · 0 comments

Comments

@pawelka
Copy link

pawelka commented Dec 5, 2021

I'm trying to use https://tasmota.github.io/docs/Smart-Meter-Interface for PV inverter and I have script that shows sensors in HA, but there is an issue is with unit and icons, which only work when name is exact as configured in SENSOR_UNIT_MAP (sensor.py). It means that I can have for example "Voltage" sensor only one, but in reality I have 5 voltage sensor 2 on DC site and 3 for AC site, so when I name "Voltage DC1" etc., standard sensor with unit ' ' is displayed.

The question is:
Is it possible to add support for unit discovery if any on standard matching doesn't works? Means if unit not selected check if quantity String contains any of key for SENSOR_UNIT_MAP, if yes, unit is selected. This will allow to have multiple name for example "DC1 Voltage" or "Voltage DC1" or "Voltage.DC1" in any of those case "Voltage" unit will be selected.

I tried to analyse code and it's look like it's only option (correct me if I'm wrong), because units are not passed in "Tasmota integration", there are units passed in "HA integration", but this will require change in Tasmota for HA integration and I assume it will become obsolete in future, so I prefer find a solution for "Tasmota integration".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant