In an effort to reduce my lovelace code I’ve tried several ways of reducing this code but haven’t found a way. The only difference is the font-weight, any suggestions?
- type: conditional
conditions:
- entity: sensor.room_presence
state: 'BR2'
elements:
- type: state-label
entity: input_text.br2
tap_action:
action: none
hold_action:
action: none
style:
top: *row_03
left: *column_1
max-width: 1px
font-weight: *font_700
# font-weight: "${states['sensor.room_presence'].state === 'BR2' ? 700 : 400}"
- type: conditional
conditions:
- entity: sensor.room_presence
state_not: 'BR2'
elements:
- type: state-label
entity: input_text.br2
tap_action:
action: none
hold_action:
action: none
style:
top: *row_03
left: *column_1
font-weight: *font_400
max-width: 1px