opened
Frostman
username_0
Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in [the Feature Requests section](https://community.home-assistant.io/c/feature-requests) of our community forum:

**Home Assistant release (`hass --version`):**

0.56.0

**Python release (`python3 --version`):**

Python 3.6.3

**Component/platform:**

prometheus

**Description of problem:**

Due to the code in prometheus component https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/prometheus.py#L176-L179 there is incorrect handling of battery level as humidity due to the classification based on the measurement.

**Expected:**

Have humidity and battery level reported separately.

**Problem-relevant `configuration.yaml` entries and steps to reproduce:**

To reproduce you should have devices with battery level added (like iOS app) and prometheus enabled.
Prometheus: reporting battery level as humidity
issue
created
Frostman
username_0
I'd like to contribute fix for it, so, some advice will be very helpful if there were already some thoughts on doing it.

There is an easy way to fix, but not very nice looking. Just make additional separation based on the entity attributes. For example, device battery level has an attribute "Device Name" specific to it, so, we can add condition for attribute exist or not after selecting by unit of measurement.
comment
closed
fabaff
username_1
issue