Hi,
Sorry only just saw you replied. Units are not displayed by default on the button card. Is it possible to add them?
1 Like
Does anyone know if its possible to display βcustomβ text in place of the state, when using a button card, with control type of state?
Something a little like this:
- type: custom:material-button-card
entity: binary_sensor.motion_detection_stairs
name: Stairs
icon: mdi:switch
height: 97
use_default_text: false
show_label: true
label: |
[[[
return (entity.state === 'off') ? 'Clear' : 'Detected';
]]]
use_default_icon: true
use_default_toggle: false
control_type: state
tap_action:
action: more-info
hold_action:
action: toggle
card_mod:
style: |
.chevron,
ha-svg-icon.chevron {
display: none !important;
}
.label {
text-transform: capitalize !important;
}
The above code shows the card with no state at all
Thanks for reporting this. Iβm planning to address it in the next release.
At the moment, Iβm working on new features and optimizations across all components.
More updates will follow shortly.