I’m using the mushroom chips on a dashboard and I’m trying to conditionally display one of the chips based on time of the day. e.g. Show the espresso chip between 6am and 10am.
I’ve gotten stuck trying to add a time condition and I’m not sure what I’m doing wrong.
Error message:
At path: chips.1.conditions.0.entity – Expected a string, but received: undefined
type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.time
use_entity_picture: false
- type: conditional
conditions:
- condition: time
after: "06:00:00"
before: "10:00:00"
chip:
type: entity
entity: switch.espresso
icon: mdi:coffee
tap_action:
action: toggle
icon_color: teal
- type: weather
entity: weather.hal
show_temperature: true
show_conditions: false
alignment: justify
card_mod:
style:
mushroom-entity-chip:nth-child(1)$mushroom-chip$: |
ha-card {
--chip-icon-size: 0px;
}
mushroom-entity-chip: |
ha-card {
--chip-background: none;
--chip-border-width: 0;
--chip-font-size: 1.6rem;
--chip-font-weight: 400;
--chip-icon-size: 32px;
margin-top:10px
}
I’ve tried many different variations, with the time in quotes, no quotes, but still can’t figure it out.
But if I make it conditional based on an existing entity (light state = on), then it works.
e.g.
type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.time
use_entity_picture: false
- type: conditional
conditions:
- entity: light.master_bedroom_light
state: 'on'
chip:
type: entity
entity: switch.espresso
icon: mdi:coffee
tap_action:
action: toggle
icon_color: teal
- type: weather
entity: weather.hal
show_temperature: true
show_conditions: false
alignment: justify
card_mod:
style:
mushroom-entity-chip:nth-child(1)$mushroom-chip$: |
ha-card {
--chip-icon-size: 0px;
}
mushroom-entity-chip: |
ha-card {
--chip-background: none;
--chip-border-width: 0;
--chip-font-size: 1.6rem;
--chip-font-weight: 400;
--chip-icon-size: 32px;
margin-top:10px
}