Custom Picture/Entity Picture & bugfix
New Features
- Entity Picture/Custom Picture support, per state and with styling (Fixes #3). New options are:
show_entity_picture
, default isfalse
entity_picture
entity_picture_style
Example config looks like this:
- type: "custom:button-card"
entity: switch.skylight
entity_picture: https://upload.wikimedia.org/wikipedia/en/e/ed/Nyan_cat_250px_frame.PNG
show_entity_picture: true
name: Entity Picture Default
state:
- value: 'off'
entity_picture_style:
- filter: grayscale(100%)
- border-radius: 50%
- value: 'on'
style:
- animation: blink 2s ease infinite
entity_picture_style:
- border-radius: 50%
- type: "custom:button-card"
color_type: card
entity: switch.skylight
show_entity_picture: true
name: Entity Picture State
state:
- value: 'off'
color: black
entity_picture: https://welovecatsandkittens.com/wp-content/uploads/2013/09/fallling-asleep-at-keyboard-cat.jpg
entity_picture_style:
- filter: grayscale(100%)
- value: 'on'
color: '#ce42f4'
entity_picture: https://media.tenor.com/images/d740131a4906504d47cab865f1bd95b3/tenor.gif
Fix
- Fix #125 : Border Clipping & rounded corner
Breaking Change
- If using blink, the whole card will now blink. I might bring back only the icon/text blinking in the future.
Others
- Code cleanup