thomasloven / lovelace-fold-entity-row

🔹 A foldable row for entities card, containing other rows
MIT License
561 stars 37 forks source link

`open` attribute can evaluate a template function #232

Closed rhoriguchi closed 1 year ago

rhoriguchi commented 1 year ago

A cool feature would be if you could add a function to open attribute instead of just a boolean since in some cases you don't want it open when you don't have a specific value.

My use case is when the parent entity value is unknown I don't want the toggle to be open since I don't have any data in the sub entities.

type: custom:fold-entity-row

head:
  entity: sensor.ipv4_address_wlan0
  name: wlan0
  icon: mdi:web

open: '{{ not is_state(''sensor.ipv4_address_wlan0'', ''unknown'') }}'

entities:
- entity: sensor.network_throughput_in_wlan0
  name: Down
  icon: mdi:download
- entity: sensor.network_throughput_out_wlan0
  name: Up
  icon: mdi:upload
ildar170975 commented 1 year ago

duplicates https://github.com/thomasloven/lovelace-fold-entity-row/issues/173

ildar170975 commented 1 year ago

@rhoriguchi you may write your example in that open thread.