Changing sensor outputs / types

So I have integrated cat feeder and fountain by Xiaomi to my smart home and they both have sensors for checking if the lid is open but the sensors are different type. One is just sensor(0/1) and other is switch(true/false). The main problem i have with this (besides it being just sutpid) is showing on dash board. Now it looks like this:

So my questions are:

  1. Can i change the output on dash board based on real value? (0 = no, 1 = yes)
  2. Can i change the sensor/switch type or its output somewhere in its yaml definition? (without using templates or other sensors)

Depending on how the integration handles the sensor/binary_sensor you may be able to change the device class by clicking on the entity, then clicking on the cog icon at the top of the pop up window, then changing the “Show as” option:

Thanks, but sadly its not that easy. This option doesnt show up.

Then your best option would be to raise an issue for the integration to get the sensors fixed. What integration are you using to create the sensors (share a link to the documentation)?

Otherwise you can use manual customisation to change the device class:

1 Like

Im using Xiaomi Miot (link bellow). I will try the customization. Thanks. Besides this is there a way to change sensor output on dashboard? Using some kind of state_template property?

Yeah that’s a third party integration. Open a new issue with the developer mentioning hey need to apply the correct device classes to their sensors.

Yes some custom cards allow that. Like the Mushroom template card or custom-button-card.

1 Like