Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:button-card
- entity: input_select.status
- show_icon: false
- show_name: false
- action: none
- styles:
- grid:
- - grid-template-areas: '"on off auto"'
- - grid-template-columns: 1fr 1fr 1fr
- - column-gap: 1rem
- card:
- - padding: 1rem
- - box-shadow: 0rem .25rem .5rem rgba(0,0,0,0.2)
- - aspect-ratio: 2
- - overflow: visible
- state:
- - value: 'on'
- styles:
- card:
- - background: green
- - value: 'off'
- styles:
- card:
- - background: red
- - value: auto
- styles:
- card:
- - background: purple
- custom_fields:
- 'on':
- card:
- type: custom:button-card
- entity: input_select.status
- show_icon: false
- name: 'On'
- tap_action:
- action: call-service
- service: input_select.select_option
- data:
- option: 'on'
- target:
- entity_id: input_select.status
- styles:
- card:
- - aspect-ratio: 1
- - border-radius: 20rem
- - background: rgba(255,255,255,.15)
- name:
- - color: white
- - font-weight: bold
- - font-size: 1.5rem
- 'off':
- card:
- type: custom:button-card
- entity: input_select.status
- show_icon: false
- name: 'Off'
- tap_action:
- action: call-service
- service: input_select.select_option
- data:
- option: 'off'
- target:
- entity_id: input_select.status
- styles:
- card:
- - aspect-ratio: 1
- - border-radius: 20rem
- - background: rgba(255,255,255,.15)
- name:
- - color: white
- - font-weight: bold
- - font-size: 1.5rem
- auto:
- card:
- type: custom:button-card
- entity: input_select.status
- show_icon: false
- name: Auto
- tap_action:
- action: call-service
- service: input_select.select_option
- data:
- option: auto
- target:
- entity_id: input_select.status
- styles:
- card:
- - aspect-ratio: 1
- - border-radius: 20rem
- - background: rgba(255,255,255,.15)
- name:
- - color: white
- - font-weight: bold
- - font-size: 1.5rem
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement