Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106428

[HELP] change card color when entity is unlocked

$
0
0

Hi Everyone,

I have the following syntax that shows me the lock details and I want to add the feature that if the lock is open/unlock the whole card would change color to red.
any suggestions?

Thanks!

- type: horizontal-stack
      cards:
      - type: custom:card-modder
        card:
          type: entities
          title: Door
          show_header_toggle: false
          state_color: true
          
          entities:
            - entity: sensor.schlage_touchscreen_deadbolt_door_lock_battery
              name: Battery level
            - entity: lock.schlage_touchscreen_deadbolt_door_lock
              name: Front Door Lock
              secondary_info: show-state
              secondary_info: last-changed
        style:
            background-image: url("/local/cardbackK.png")
            background-repeat: no-repeat
            background-color: rgba(50,50,50,0.6)
            background-size: 100% 68px
            border-radius: 20px
            border: solid 1px rgba(100,100,100,0.3)
            box-shadow: 3px 3px rgba(0,0,0,0.4)
            color: rgb(220, 230, 247)
            --st-font-size-xl: 15px
            --st-font-size-m: 18px
            --st-font-size-title: 7px
            --st-font-size-sensors: 15px
            --st-spacing: 2px

2 posts - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>