Mixing Entities

Hi All,

I was just wondering if its possible to mixx entities to display 2 items on a single line - dependant on whether the primary element is powered on? - What I am trying to achieve is to display:

  • switch.fish_tank - Displays ‘Fish Tank’ and a switch on/off

I want to add another attribute:

sensor.hive_plug_watts - which will display the wattage of my plug when its powered on - shown together they will display:

‘Fish Tank (Currently using 50w’s)’ - when the switch is on and just revert to ‘Fish Tank’ when the switch is off.

I have data from both sensors, but I cannot work out how to join them on 1 line.

Thanks

When you refer to a single line, are you talking about in the web interface?

Yes, that’s correct - so where as normally for a single line I would write:

  • switch.fish_tank

To display the output of the plug - I want to add addition text to let me know how much power it is using, which is taken from the other sensor:

  • sensor.hive_plug_watts

You’ll need to create a custom UI element for that. That’s not possible with a basic configuration.

Ah ok - any idea’s where to start? :slight_smile:

Well, you could cruise the forum and look for the phrase “Custom UI”. Someone may have already created this for you.

Or

You could try making this in Lovelace. Which might have different UI options that you didn’t even think of (making the need for this functionality pointless).

https://home-assistant-lovelace-gallery.netlify.com/#

1 Like