#"or" condition requires entity?

1 messages · Page 1 of 1 (latest)

slate bobcat
#

Here's a card using an "or" condition.

type: entities
entities:
  - entity: switch.fireplace_fan_test
  - entity: valve.fireplace_vent_valve_test
  - type: conditional
    conditions:
      - condition: or
        conditions:
          - condition: state
            entity: valve.fireplace_vent_valve_test
            state: open
          - condition: state
            entity: switch.fireplace_fan_test
            state: "on"
        # Why is the following unused entity requried?
        # entity: unused
    row:
      entity: input_number.fireplace_off_timer
      name: Delay OFF for
title: Fireplace
show_header_toggle: false

In the HA dashboard editor ("Entities Card configuration", yaml view), it displays the following error if I don't have the entity: unused in place:

Configuration error
Required key 'entities.2.conditions.0.entity' is missing.

If I uncomment the entity then everything is happy. Oddly, even when the editor is showing the error the preview card at the right still works but I can't save.

Any ideas?

wild onyx
#

Pretty sure those should all be entity_id in the condition anyway

deft robin
#

Looks like a bug in the ui

#

it's expecting the old style of conditions with entity and state:/state_not:

slate bobcat
#

I tried changing entity to entity_id and that just made the condition stop working. There seems to be some difference between card conditions (which I'm guessing is applicable here) and automation conditions. Are they supposed to be the same?

Home Assistant

The Conditional card displays another card based on conditions.

deft robin
#

card conditions and automation conditions are not the same thing

#

probably should have used the same syntax, but 🤷

#

follow the card conditions documentation

slate bobcat
#

@deft robin If this is a bug (the required but unused entity), should I report this and if so, is it a frontend or core bug? I'm still learning HA.

deft robin
#

sure feel free to report it. it's a frontend bug