Hej!
I absolutely love the SoftUI theme and button styles, and I’m busy with configuring my dashboards to show this off. Right now Im trying to integrate the SoftUI remote; which looks a little better than my current setup. I am frustratingly close, but I can’t seem to get it to do what I want.
The code is as follows:
entities:
- cards:
- icon: 'mdi:power'
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- width: 60px
- height: 60px
- margin: 10px 10px 10px 155px
- border-radius: 100px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_toggle
entity: script.tv_toggle
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
- cards:
- entities:
- cards:
- icon: 'mdi:menu-up'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 69px
- box-shadow: none
- width: 50px
- height: 50px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_arrow_up
entity: script.tv_arrow_up
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
- cards:
- icon: 'mdi:menu-left'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 10px
- box-shadow: none
- width: 50px
- height: 50px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_arrow_left
entity: script.tv_arrow_left
type: 'custom:button-card'
- name: OK
show_icon: false
show_name: true
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- width: 200px
- height: 50px
- border-radius: 100px
- background-color: var(--primary-background-color)
name:
- font-size: 20px
- font-weight: bold
- font-family: Helvetica
- letter-spacing: '-0.01em'
tap_action:
action: call-service
service: script.tv_return
entity: script.tv_return
type: 'custom:button-card'
- icon: 'mdi:menu-right'
show_icon: true
show_name: false
size: 100%
styles:
card:
- box-shadow: none
- width: 50px
- height: 50px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_arrow_right
entity: script.tv_arrow_right
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
- cards:
- icon: 'mdi:menu-down'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 69px
- box-shadow: none
- width: 50px
- height: 50px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_arrow_down
entity: script.tv_arrow_down
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
show_header_toggle: false
style: |
ha-card {
box-shadow:
inset -3px -3px 5px rgba(50, 50, 50, .5), inset 3px 3px 5px rgba(0, 0, 0, .3);
border-radius: 30px;
background-color: var(--primary-background-color)
}
type: 'custom:hui-entities-card'
type: 'custom:hui-horizontal-stack-card'
- show_icon: false
show_name: false
style: |
ha-card {
--ha-card-background: none !important;
box-shadow: none !important;
}
styles:
card:
- width: 10px
- height: 10px
type: 'custom:button-card'
- cards:
- entities:
- cards:
- icon: 'mdi:minus'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 30px
- box-shadow: none
- width: 30px
- height: 30px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.sound_bar_sound_down
entity: script.sound_bar_sound_down
type: 'custom:button-card'
- name: VOL
show_icon: false
show_name: true
styles:
card:
- margin-left: 50px
- box-shadow: none
- width: 30px
- height: 30px
- border-radius: 100px
- background-color: var(--primary-background-color)
name:
- font-size: 13px
- font-weight: bold
- font-family: Helvetica
- letter-spacing: '-0.01em'
type: 'custom:button-card'
- icon: 'mdi:plus'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 10px
- box-shadow: none
- width: 30px
- height: 30px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.sound_bar_sound_up
entity: script.sound_bar_sound_up
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
- cards:
- icon: 'mdi:arrow-expand-down'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 30px
- box-shadow: none
- width: 30px
- height: 30px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: switch.turn_on
entity: switch.sonoff_1000ae39e0_1
type: 'custom:button-card'
- name: LIFT
show_icon: false
show_name: true
styles:
card:
- margin-left: 10px
- box-shadow: none
- width: 30px
- height: 30px
- border-radius: 100px
- background-color: var(--primary-background-color)
name:
- font-size: 13px
- font-weight: bold
- font-family: Helvetica
- letter-spacing: '-0.01em'
type: 'custom:button-card'
- icon: 'mdi:arrow-expand-up'
show_icon: true
show_name: false
size: 100%
styles:
card:
- margin-left: 10px
- box-shadow: none
- width: 30px
- height: 30px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: switch.turn_on
entity: switch.sonoff_1000ae39e0_2
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
show_header_toggle: false
style: |
ha-card {
background-color: var(--primary-background-color);
border-radius: 15px;
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
type: 'custom:hui-entities-card'
type: 'custom:hui-horizontal-stack-card'
- cards:
- icon: 'mdi:home'
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- margin-top: 10px
- margin-left: 5px
- width: 60px
- height: 60px
- border-radius: 15px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_home
entity: script.tv_home
type: 'custom:button-card'
- icon: 'mdi:Netflix'
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- margin-top: 10px
- margin-left: 8px
- width: 60px
- height: 60px
- border-radius: 15px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_netflix
entity: script.tv_netflix
type: 'custom:button-card'
- icon: 'mdi:amazon'
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- margin-top: 10px
- margin-left: 8px
- width: 60px
- height: 60px
- border-radius: 15px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_toggle
entity: script.tv_toggle
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
- cards:
- icon: 'mdi:home' #start of the second button rows - these are now correct
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- margin-top: 10px
- margin-left: 5px
- width: 60px
- height: 60px
- border-radius: 15px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_home
entity: script.tv_home
type: 'custom:button-card'
- icon: 'mdi:Netflix'
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- margin-top: 10px
- margin-left: 8px
- width: 60px
- height: 60px
- border-radius: 15px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_netflix
entity: script.tv_netflix
type: 'custom:button-card'
- icon: 'mdi:amazon'
show_icon: true
show_name: false
style: |
ha-card {
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
styles:
card:
- margin-top: 10px
- margin-left: 8px
- width: 60px
- height: 60px
- border-radius: 15px
- background-color: var(--primary-background-color)
icon:
- color: var(--primary-text-color)
tap_action:
action: call-service
service: script.tv_toggle
entity: script.tv_toggle
type: 'custom:button-card'
type: 'custom:hui-horizontal-stack-card'
show_header_toggle: false
style: |
ha-card {
background-color: var(--primary-background-color);
width: 300px;
border-radius: 10px;
margin: 10px auto;
box-shadow:
-5px -5px 8px rgba(50, 50, 50, .2), 5px 5px 8px rgba(0, 0, 0, .08);
}
type: entities
which results in the following:
I can’t seem to get the width right of three of the elements as shown in the picture. This is how it should look like, for those who don’t know:
Any help would be greatly appreciated!
Marnix