benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI
MIT License
798 stars 60 forks source link

hide_if not working [for main entity] #227

Open metbril opened 2 years ago

metbril commented 2 years ago

I have this card, where hide_if doesn't do anything:

type: entities
entities:
  - entity: sun.sun
  - entity: sun.sun
    type: custom:multiple-entity-row
    name: Above
    hide_if: below_horizon
  - entity: sun.sun
    type: custom:multiple-entity-row
    name: Below
    hide_if: above_horizon

I've tried multiple variants, without effect:

  - entity: sun.sun
    type: custom:multiple-entity-row
    name: Below
    hide_if: 
      value: above_horizon

  - entity: sun.sun
    type: custom:multiple-entity-row
    name: Below
    hide_if: 
      value:
        - above_horizon

The README doesn't provide examples. Am I doing something wrong?

ildar170975 commented 2 years ago

Answered here: https://community.home-assistant.io/t/lovelace-multiple-entity-row/109109/192?u=ildar_gabdullin

metbril commented 2 years ago

The documentation in the README is not explicit that the parameters only apply to the secondary entities.

ildar170975 commented 2 years ago

The hide_if option is specified for additional entities (https://github.com/benct/lovelace-multiple-entity-row#entity-objects) and NOT specified for the main entity (https://github.com/benct/lovelace-multiple-entity-row#configuration). Look at ANY card on Github - if some option is specified in some section and NOT specified in other sections - that means that other sections do not support this option.

reefland commented 2 years ago

@ildar170975 - thanks for explaining it. Respectfully, the documentation is confusing on this. The documentation does not use words like "main entity" and "additional entities", it just says "Configuration" and "Entity Objects" which the main is an "Entity".

ildar170975 commented 2 years ago

The documentation does not use words like "main entity" and "additional entities"

@reefland , you are right, it could be difficult for new people. You may ask any questions in the corresponding thread (https://community.home-assistant.io/t/lovelace-multiple-entity-row/109109).

metbril commented 2 years ago

ask any questions in the corresponding thread

... or anyone could submit a pull request for the README. :wink: