royto / logbook-card

Logbook card for Home Assistant UI Lovelace
GNU General Public License v3.0
192 stars 9 forks source link

hidden_state attribute #65

Closed dimmuboy closed 1 year ago

dimmuboy commented 1 year ago

Is possible to implement hiding of entries based on attribute? I would like to hide entries if specific attribute is Null.

royto commented 1 year ago

So whatever the state is, if the entity attribute has a value, the log is hidden. right ?

dimmuboy commented 1 year ago

I have Steam and Discord sensors and I would like to see only if attribute Game is something. I just want to filter out these empty states without any game: image

royto commented 1 year ago

the attribute value is null or the attribute is not present for this state ?

dimmuboy commented 1 year ago

Both are true. In Discord sensor it's null but in Steam doesn't present. But I will check once again because Steam probably doesn't works due to that so just Discord with null value is in the game.

royto commented 1 year ago

New version 1.10.0 released with ability to filter based on attributes. Can you check it ?

dimmuboy commented 1 year ago

Sorry, I'm late. It works absolutely perfectly! Thank you

type: custom:logbook-card
entity: sensor.steam_7656***
hidden_state:
  - state: away
  - attribute:
      name: game
      value: ''
      hideIfMissing: true
attributes:
  - value: game
.
.
.