#I am using the Mushroom person entity
1 messages · Page 1 of 1 (latest)
So you've got a couple of questions there. The easiest is the secondary information. The Mushroom cards don't allow a whole lot of customization outside of what the developer designed. Instead, you'll want to use a custom:mushroom-template-card. The thing with this card is you have to define everything, but you can easily replicate the mushroom-person-card.
Here's some code to get you started:yaml type: custom:mushroom-template-card entity: person.derek layout: vertical primary: '{{ states("sensor.s22_ultra_geocoded_location") }}' secondary: '{{ state_attr("light.living_room1", "brightness") }}' picture: '{{ state_attr(config.entity, "entity_picture") }} ' tap_action: action: more-info
For your geocoded location, it depends on if you have it available as its own entity or as an attribute of another entity. I show the entity example as the Primary and an example of how to call an attribute as the Secondary.
If you want to incorporate the badge, that takes a little more work. I'm not going to try to write it all up here because I don't really have locations set up for myself but I found a good example you can reference: https://www.reddit.com/r/homeassistant/comments/10rwsr2/how_to_change_icon_in_mushroom_person_card/j703do6/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button
Thanks for your hard work i'll give it a shot
@hollow scarab I got to thinking about this a few minutes ago. Here's my thoughts. The geocoded location is cool but what abput areas you frequent, such as work, school, gym, etc. That's where zones come in to play. I'm thinking if you set up some zones, it should be possible to have the secondary show the zone that the device is in. But, if the device is Away, then it returns the geocoded location.
Additionally, it might be possible to return just a portion of the geocoded location. Perhaps, the address and city but not the state, zip code, and country.
It looks like the Places integration handles Zones. Rosemary is in the Home zone and it just shows the zone name, but we are not.
(dont mind people knowing where we are, we move often 😛 )
Are you trying to replicate that as a Mushroom card?
What you mean? The above screeshot is a mushroom template card using what you showed me
Okay. Gotcha. I was thinking that that was something that Places had created for you. How does it handle when you are not in a zone such as Home or House?
House isn't a zone. I'm not sure what Places gets that from, maybe the fact that it is residential? I am just starting testing this now.
It just geodecodes the gps as 'House, 9981 US 550, La Plata County, CO
I gotcha. So it looks like it is trying to do what I was thinking. If you're in a zone, show the zone. if you're not in a zone, show the address (in this case adding House)
exactly. i'll have to wait and see tomorrow when people start moving around
Looking at the docs, it looks like there is some advanced display options available. https://github.com/custom-components/places#advanced-display-options