Adds highly configurable buttons that use actions and per-state styling.
app-drawer-layout
-> ha-drawer
in HA 2023.4 (5fd0a36)app-drawer-layout
-> ha-drawer
in HA 2023.4 (b26a30c)Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/2.1.2...2.1.3
state-active-color
fallback when state is on (3cd4506)Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/2.1.1...2.1.2
Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/2.1.0...2.1.1
This release contains many improvements to the projects dev-tooling, this shouldn't really be noticeable to end-users but makes it easier to keep maintaining the project. In particular, I switched from rollup
-> vite
for much faster builds.
Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/2.0.1...2.1.0
This contains a patch for the missing state colours in 2023.2, this fix is not perfect, it's basically a polyfill that will convert the hex state colours into the now missing RGB colours. I'll have to find a better fix for this in the next release but that may require breaking changes.
Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/2.0.0...2.0.1
Home Assistant 2022.12 has removed the --paper-item-icon-active-color
and replaced it with several rgb state colours. In order to support this change the --paper-item-icon-color
variable is no longer supported, and --paper-item-icon-active-color
has no value by default, buttons will now use the state colour for their entity.
Several CSS variables are however now available for styling, most importantly you should rename the following.
--paper-item-icon-color
âž¡ --pbs-button-color
--paper-item-icon-active-color
âž¡ --pbs-button-active-color
If you do not want to use the new state colors you can force the button to use the old active color by adding the following.
type: custom:paper-buttons-row
# on all buttons
styles:
"--pbs-button-active-color": "#fdd835"
buttons:
- entity: light.bedroom_light
# or per-button
styles:
"--pbs-button-active-color": "#fdd835"
rgb_color
attribute from any entity that has it.ripple
option is available to switch between none
, circle
, and fill
. (8f6ffd1) (fixes #87)preset
config option. Currently, only the mushroom
preset is available, which mimics the buttons from piitaya/lovelace-mushroom.button-active
CSS class and uses a different set of CSS variables, this is particularly useful alongside presets.aper-button[data-state="on"] {
color: red;
Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/1.0.1...2.0.0
Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/1.0.0...1.0.1
This is a rather big release, the entire codebase has been converted to Typescript which should help considerably with avoiding bugs and generally with maintaining the project. I've tried to minimise any breaking changes the plugin should work the same as before or better aside from the breaking changes listed below.
state_icons
to use templated state value (fixes #51) (28d6f24)
state_icons
was incorrectly using the entities state instead of the configured state template, state_styles
and state_text
were using the correct value.justify-content: center
by default, this might affect your buttons that expected the content to be aligned to flex-start
. I had quite a few people asking how to center the text/content and looking at my own buttons I used center
a lot more than flex-start
so I decided it was better to change the default. To fix any affected buttons update your config to include the following. (closes #29)
styles:
button:
justify-content: flex-start
style
option to styles
(f671d9f)
style
will still work, but styles
is the preferred keyword now to improve consistency for button-card users.align_icon
and align_icons
(2214395)
layout
option instead.extra_styles
support (2ce78d1) (closes #58, #59, #31)hide_state
and hide_badge
options for extended rows (33a7261)custom-card-helpers
which has one of the main benefits of better icon extraction for states and more domains (fixes #45).Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/0.6.2...1.0.0
Full Changelog: https://github.com/jcwillox/lovelace-paper-buttons-row/compare/0.6.0...0.6.1