#I would like a conditional card on my dashboard but idk how to do this and chatgpt was way wrong.

1 messages · Page 1 of 1 (latest)

frosty void
#

i would like it to watch sensor.dexcom and it it go below 70 that it would show input.ulowalert, input.lowalert, and input.alert. If it goes above 250, then i want it to show input.highalert and input.alert. if it is between 70 and 250, then i just want it to show input.alert

Is this possible and how?

#

chatgpt gave me this but home assistant does not like it.

type: conditional
conditions:

  • entity: sensor.dexcom_princesssophie_glucose_value
    state_not: unavailable
    card:
    type: entities
    entities:
    • type: conditional
      conditions:
      • entity: sensor.dexcom_princesssophie_glucose_value
        state: "< 70"
        card:
        type: entities
        entities:
        • input_boolean.ulowalert
        • input_boolean.lowalert
        • input_boolean.alertsystem
    • type: conditional
      conditions:
      • entity: sensor.dexcom_princesssophie_glucose_value
        state: "> 250"
        card:
        type: entities
        entities:
        • input_boolean.highalert
        • input_boolean.alertsystem
    • type: conditional
      conditions:
      • entity: sensor.dexcom_princesssophie_glucose_value
        state: ">= 70"
      • entity: sensor.dexcom_princesssophie_glucose_value
        state: "<= 250"
        card:
        type: entities
        entities:
        • input_boolean.alertsystem
keen haven
#

Given that you always want to see alert (show if <70, >250 and between 70 and 250) I think you can do something like this:

entities:
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.dexcom
        below: 70
    row: 
      - input_boolean.ulowalert
      - input_boolean.lowalert
  - input_boolean.alert
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.dexcom
        above: 250
    row: input_boolean.highalert```
#

I am not 100% sure you can define multiple entities like that in the first row: - you might have to duplicate the condition and have ulowalert and lowalert separated

frosty void
#

this is what i got in there and it does me an error. no card type configured

type: conditional
conditions:

  • condition: numeric_state
    entity: sensor.dexcom_princesssophie_glucose_value
    above: 250
  • condition: or
    conditions:
    • condition: numeric_state
      entity: sensor.dexcom_princesssophie_glucose_value
      below: 70
      card:
      type: entities
      entities:
    • type: conditional
      conditions:
      • condition: numeric_state
        entity: sensor.dexcom_princesssophie_glucose_value
        below: 70
        row:
      • input_boolean.ulowalert
      • input_boolean.lowalert
    • input_boolean.alertsystem
    • type: conditional
      conditions:
      • condition: numeric_state
        entity: sensor.dexcom_princesssophie_glucose_value
        above: 250
        row:
      • input_boolean.highalert
keen haven
#

It's not to go in a condition card, it's an entities card

frosty void
#

oh

#

still comes up with No card type configured

  • input_boolean.highalert
#

it shows the alertsystem entity, but for the high, it shows that

#

i might have it

#

type: entities
entities:
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.dexcom_princesssophie_glucose_value
below: 70
row:
entities:
- input_boolean.ulowalert
- input_boolean.lowalert
- input_boolean.alertsystem
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.dexcom_princesssophie_glucose_value
above: 250
row:
entity: input_boolean.highalert

#

instead of - input_bo it needed to be entity: input_bo

#

we will see if this works today and i will let you know

#

not sure that the low ones will work, but HA is happy with the code, so we will see

keen haven
#

well change the condition limit to be like 700 and see if they display

#

p.s. when you're pasting YAML like this - try to remember to put 3x ` marks at the start and end, it makes it be formatted as code and makes it much easier to follow indenting and stuff

frosty void
#
type: entities
title: Sophie's Alert System
state_color: true
entities:
  - input_boolean.alertsystem
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.dexcom_princesssophie_glucose_value
        below: 85
    row:
      entity: input_boolean.ulowalert
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.dexcom_princesssophie_glucose_value
        below: 85
    row:
      entity: input_boolean.lowalert
  - type: conditional
    conditions:
      - condition: numeric_state
        entity: sensor.dexcom_princesssophie_glucose_value
        above: 240
    row:
      entity: input_boolean.highalert
#

i had to split the lows, but it works and i fined tuned it

#

thank you for your help