lovelace-mushroom
lovelace-mushroom copied to clipboard
Person - Greyscale Entity Picture on Away
Currently within Musthroom, when a person is marked as away the state changes and the icon is amended, However as a fast glance option it would be useful to have the entity_picture apply a filter of greyscale on away
filter: grayscale(100%);
This could be optional for example:
- type: custom:mushroom-person-card
entity: person.me
use_entity_picture: true
hide_name: true
greyscale_on_away: true
Is there a way to do this with the card-mod frontend module?
I have a draft of this working, but the issue we currently having is knowing which zone is at home, and which zone is away.
The icon for example goes lighter if the entity state is not home
, however since a person can also be in a room from the mqtt_room
integration, it shows the icon as the lighter colour for this when they're still at home. Applying the same logic here would make the picture greyscale when they're in a room, as their state isn't home
.
Unsure how best to handle this one, as it is technically a bug as well
My proposal :
- if state is
away
orunavailable
: grey-scale - if state in
home
orzone
: colored
I don't think we should split zones into 2 types (not home/home). The passive
zone options can be used to exclude zones you don't want to be considered as home
.
My proposal :
- if state is
away
orunavailable
: grey-scale- if state in
home
orzone
: coloredI don't think we should split zones into 2 types (not home/home). The
passive
zone options can be used to exclude zones you don't want to be considered ashome
.
Right now, the grey-scale icon is shown based purely on if state === home
Should be a simple logic change, but this does mean that if you're in the zone labelled as office
as per the dev container, you'll be showing in colour, not grey scale, even though you're not home?
I can make the PR if you're happy with that flow?
Yep but you are in a known zone. 😅
I will give some tests. Zones entity contains a person list. What happen if you define a zone inside the home zone ? 😅