Card configuration Error

So, I have the following conditional card :

cards:
  action: call-service
  conditions:
    entity: sensor.xiaomi_cooker_mode
    state: Running
  entity: sensor.xiaomi_cooker_state
  icon: 'mdi:star-box-outline'
  icon_height: 100px
  name: Running
  service: xiaomi_cooker.stop
  tap_action: null
  type: entity-button
type: conditional

Am getting an error in card configuration and can’t figure out what’s wrong with the code .

Any suggestions please ?

Thanks

What error are you getting?

From the lovelace example:

type: conditional
conditions:
  - entity: light.bed_light
    state: "on"
  - entity: switch.decorative_lights
    state_not: "off"
card:
  type: entities
  entities:
    - device_tracker.demo_paulus
    - cover.kitchen_window
    - group.kitchen
    - lock.kitchen_door
    - light.bed_light

Yours should probably look more like:

type: conditional
conditions:
  entity: sensor.xiaomi_cooker_mode
  state: Running
card:
  type: entity-button
  entity: sensor.xiaomi_cooker_state
  icon: 'mdi:star-box-outline'
  icon_height: 100px
  name: Running
  tap_action:
    action: call-service
    service: xiaomi_cooker.stop

The state might need quotes before and after. The capitol R might cause problems if the device reports as ‘running’ instead of ‘Running’.

Thanks for the suggestion !

Tried with your code instead but it also results in the same error … Error in card configuration

It’s a very generic error, no clue what exactly it means

Try this:

type: conditional
conditions:
  - entity: sensor.xiaomi_cooker_mode
    state: Running
card:
  type: entity-button
  entity: sensor.xiaomi_cooker_state
  icon: 'mdi:star-box-outline'
  icon_height: 100px
  name: Running
  tap_action:
    action: call-service
    service: xiaomi_cooker.stop
1 Like

Thanks so much, that worked perfectly !!! :slight_smile: :pray:

1 Like