Visualizing complex mysensors sensor

I’m just getting started with HA, and am trying to get one of my more complex sensors working fully.

I have a sensor that monitors a water tank level. It returns a value 0% to 100%. This works fine in HA, and is displayed properly. However, this sensor also provides a ‘raw level’ value, and has 2 configurable properties ‘max level’ and ‘min level’ (which can be sent back to the sensor and stored in EEPROM). These are:
V_VAR1: raw tank level (read only)
V_VAR2: raw tank level for 100% (read/write)
V_VAR3: raw tank level for 0% (read/write)
Basically I can configure the proper raw values for ‘0%’ and ‘100%’ to calibrate the displayed tank level.

In HA, when I click on the sensor , I can see the values of these, but I can’t figure out how to give nice names to V_VAR1, V_VAR2, V_VAR3, or how to make V_VAR2 and V_VAR3 editable from the pop-up configuration.

Do I need to build a custom component, or is there a way to configure this directly through yaml?

To give them nice names, you would need to declare a friendly_name in your customize section. As for making the min and max editable from within HA, I don’t believe that is currently possible.

sensor.cpu_temperature:
  friendly_name: 'CPU Temp'
sensor.cpu_use:
  friendly_name: 'CPU Usage'
sensor.disk_use_:
  friendly_name: 'Disk Usage'

Thanks,
I am aware of the friendly_name, but that only gives a name to the top-level sensor. The variables are additional parameters of the existing sensor, not separate sensors, so as far as I can tell, I can’t use friendly_name to define those variable names.

Ah, I wasn’t aware that they were listed as attributes. Your only real option would be to mirror each attribute with it’s own template sensor, but then you’d lose the context popup.

1 Like