Core: MySensors value_type 4 using default icon

Created on 10 Feb 2019  路  11Comments  路  Source: home-assistant/core

Hi,

I've set up integration of a BME280 (temperature, pressure, humidity) sensor using a MySensors serial device. Everything is working fine, i.e. I see sensor updates and HA is showing them in the interface.

2019-02-10 18:59:28 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: livingroom 0: value_type 0, value = 22.4
2019-02-10 18:59:29 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: livingroom 1: value_type 1, value = 35.8
2019-02-10 18:59:29 DEBUG (MainThread) [homeassistant.components.mysensors.device] Entity update: livingroom 2: value_type 4, value = 1001.9

For temperature and humidity HA has selected the right icon. However, pressure (value_type 4) has not been recognised correctly and shows a presence icon (I believe, the eye) instead.

screenshot 2019-02-10 at 19 08 45

I am running HA 0.87.0 and MySensors 2.3.1 and using the code from
https://www.mysensors.org/build/pressure

mysensors

All 11 comments

That's the default icon. I didn't find a better icon at the time of implementation. If you have a suggestion, that would be good. It's easy to change.

Here's the module where this is set:
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/mysensors/sensor.py

what about this one:
screenshot 2019-02-10 at 19 40 36

Looks good! What icon is that?

ESPHome is using this one as well

Do you want to make a pull request, or should I do it?

please do it - I don't have this set up, thanks a lot!

BTW: it also doesn't add the "hPa" unit not automatically (in contrast to temperature and humidity)

I don't think we know that that's the unit of that type. It just says atmospheric pressure.

https://www.mysensors.org/download/serial_api_20

Another issue I noticed: When clicking on the sensor it shows a history-type of visualisation:

screenshot 2019-02-12 at 07 12 46

In contrast, one of my esphomelib sensors shows the following:

screenshot 2019-02-12 at 07 13 41

That's the behavior for sensors that don't have a unit set. You can set a custom unit for any mysensors sensor with the V_UNIT_PREFIX value type.

https://www.home-assistant.io/components/sensor.mysensors/#custom-unit-of-measurement

Was this page helpful?
0 / 5 - 0 ratings