First thing, I see posts with what looks to be a screenshot of the yaml code but is able to be copied from the top right corner, how do I do this for my post?, I will add it this to this help request to see what exsist and what I can add to do what I would like to do.
I have a vertical stack of custom bar cards to show me the real time power consumption status of the power hungry item in my home, I would like it to automatically sort them so the highest to lowest is from top to bottom, how would the code look in relation to the existing code I have currently? I will post the configuration when I know how to do it without it being a screenshot.
Cheers for any help.
type: custom:bar-card
icon: mdi:battery
entities:
- entity: sensor.solahart_power
name: Solahart
- entity: sensor.spa_power
name: Spa
- entity: sensor.living_ac_power
name: Living AC
- entity: sensor.master_ac_energy_power
name: Master AC
- entity: sensor.bailey_s_ac_energy_power
name: Bailey's AC
- entity: sensor.rhys_s_ac_energy_power
name: Rhys's AC
- entity: sensor.declans_ac_energy_power
name: Declan's AC
- entity: sensor.washing_machine_power
name: Washing Machine
- entity: sensor.dishwasher_power
name: Dishwasher
- entity: sensor.oven_power
name: Wall Oven
- entity: sensor.cooktop_power
name: Induction Cooktop
- entity: sensor.ice_machine_power
name: Ice Machine
min: 0
max: 4000
positions:
icon: 'off'
indicator: null
name: inside
severity:
- color: Red
from: 2500
to: 5000
- color: orange
from: 1500
to: 2499
- color: green
from: 1000
to: 1499
- color: null
from: 100
to: 999
- color: 'n'
from: -5
to: 15
sort:
- position: null
from: 4000
to: 0
columns: 1
limit_value: true
That button can be hidden under the cog icon button on mobile devices. There is also an alternative method and a lot of other useful information in the Forurn FAQ.
Donât use the copy button in the three dots icon at the bottom of the card.
Click in the yaml view of the card then Ctrl + A to select everything, then Ctrl + C to copy the YAML, then Ctrl + V to paste in the forum. You can also probably do all that with your right click context menu in your web browser instead of the keyboard shortcuts.
Iâm actually on my phone, I already tried highlighting all then copy, then paste, if I paste it into a note pad, it looks ok but not tabbed correctly as yaml looks, yet while the copy is still saved in the phones clip board, I paste the same info here, and I get what you can see above? Itâs an iPhone Iâm on, is there some other way to do it, the yaml is too long for a single screenshot?
Yeh thanks tom_I, I got it working with custom bar card as well including severity coloring as well, but wanted to wait till I got hoe to be able to copy the yaml to this reply. Also attached is a screen shot. The only thing left to try and clean it up is some kind of exclusion for states of 0 to 15w so that items dont show up with just noise of 3.2w and 8w, but all in all, seems to work well.
Doh! light in my head just switched on, I was over thinking it, rathe than trying to exclude a range from 0.1 to 15.0, I just added this - state: â>15â in the exclusions list to eliminate any sensors with insignificant readings becoming visible. So now its doing everything I wanted it to do. Thanks to all the responces.