Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - type: custom:button-card
- entity: ""
- styles:
- card:
- #- padding: 4%
- - font-size: 10px
- #- border-radius: var(--button-card-border-radius)
- # - background-color: var(--button-card-background-color)
- - color: white
- grid:
- - grid-template-areas: '"time date warn" "time day warn"'
- - grid-template-columns: 40% 40% 20%
- - grid-template-rows: 1fr 1fr
- custom_fields:
- time:
- - justify-self: start
- - font-size: 52px
- date:
- - justify-self: end
- - font-size: 24px
- - color: white
- day:
- - justify-self: end
- - font-size: 24px
- - color: var(--secondary-text-color)
- warn:
- - justify-self: end
- - font-size: 24px
- custom_fields:
- time: >
- [[[ return states['sensor.time'].state ]]]
- date: >
- [[[ return states['sensor.date'].state ]]]
- day: >
- [[[ return states['sensor.dayoftheweek'].state ]]]
- warn:
- card:
- type: custom:button-card
- #entity: input_boolean.warn_light
- icon: mdi:exclamation-thick
- show_name: false
- show_state: false
- tap_action:
- action: navigate
- navigation_path: '/lovelace/Larm_och_varningar'
- styles:
- card:
- - background-color: transparent
- - color: transparent
- icon:
- - color: >
- [[[
- if (states['input_boolean.warn_light'].state === 'on' )
- return "rgb(255,165,0)";
- if (states['input_boolean.alarm_light'].state === 'on' )
- return "rgb(255,0,0)";
- else
- return "green";
- ]]]
- tap_action: none
- hold_action: none
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement