Loving the latest version, the hiding of light details has meant I can cut down a lot of conditional cards and having the details on the chips card makes for a lot less clicking! Keep up the great work!
Sure, here it is:
type: custom:stack-in-card
keep:
margin: false
box_shadow: false
background: true
cards:
- type: custom:mushroom-template-card
primary: Kids' Rooms
icon: mdi:bunk-bed
tap_action:
action: navigate
navigation_path: kids-rooms
- type: custom:mushroom-chips-card
alignment: end
chips:
- type: template
icon: mdi:lamp
icon_color: >-
{{ 'amber' if expand(area_entities("XXX's Room"),
area_entities("YYY's Room")) | selectattr('domain','eq','light') |
selectattr('state','eq','on') | list | count > 0 }}
content: >-
{{ expand(area_entities("XXX's Room"), area_entities("YYY's Room")) |
selectattr('domain','eq','light') | selectattr('state','eq','on') |
list | count }}
style: |
ha-card {
box-shadow: 0px 0px;
}
- type: template
icon: mdi:television
content: >-
{{ expand(area_entities("XXX's Room"), area_entities("YYY's Room"))
| selectattr('domain','eq','media_player') |
selectattr('state','eq','playing') | list | count }}
icon_color: >-
{{ 'amber' if expand(area_entities("XXX's Room"),
area_entities("YYY's Room")) |
selectattr('domain','eq','media_player') |
selectattr('state','eq','playing') | list | count > 0}}
style: |
ha-card {
box-shadow: 0px 0px;
}
- type: template
icon: mdi:fan
content: >-
{{ expand(area_entities("XXX's Room"), area_entities("YYY's Room"))
| selectattr('domain','eq','fan') | selectattr('state','eq','on') |
list | count }}
icon_color: >-
{{ 'green' if expand(area_entities("XXX's Room"),
area_entities("YYY's Room")) | selectattr('domain','eq','fan') |
selectattr('state','eq','on') | list | count > 0}}
style: |
@keyframes rotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
ha-card {
box-shadow: 0px 0px;
animation: rotation linear infinite;
{% if expand(area_entities("XXX's Room"),
area_entities("YYY's Room")) |
selectattr('domain','eq','fan') |
selectattr('state','eq','on') | list | count > 0 %}
animation-duration: 3s;
{%- endif %}
Hereās what it looks like mid-rotation:
I also am having this same issue.
What do you mean?
I am in awe of you @piitaya this set of cards is actually making me excited about home assistant, and I agree with others this should be the default. My dashboards are a work in progress, but I am so happy to be able to have beautiful dashboards (including on my fridge). This even has my wife excited about home assistant, which is high value.
Trying to create a ALL LIGHTS OFF button using mushroom and a template card.
I get an error with templates not supported here, I assume within the Tap Action.
Any other ideas how this should be done? thanks in advance.
type: custom:mushroom-template-card
primary: All Lights
secondary: Turn off
icon: mdi:lightbulb
layout: vertical
tap_action:
action: call-service
service: homeassistant.turn_off
service_data: {}
target:
entity_id: |
{{ expand(states.light)| selectattr('state', 'eq', 'on') |
map(attribute='entity_id') | list }}
icon_color: yellow
hold_action:
action: none
double_tap_action:
action: none
Create a script instead and call it via tap action:
alias: Turn off all lights
icon: mdi:lightbulb-off-outline
mode: single
sequence:
- service: light.turn_off ## or: homeassistant.turn_off
target:
entity_id: >
{{ expand(states.light)|selectattr('state', 'eq', 'on')
|map(attribute='entity_id') | list }}
no sorry i gave up
Iām afraid I have no idea what to do with it, it also spins the whole chip entity. I created two separate next to each other one with the icon the other with the state, but then there is more distance.
Hi,
is it possible to implement the example with the mushroom template card?
https://deebot.readthedocs.io/integrations/home-assistant/examples/ui/advanced/
Thanks.
Is Release 1.7.3 pulled? The highest version in HACS is now 1.6.2 again. Also when you go to Releases, you see that 1.6.2. is the highest available atm: Releases Ā· piitaya/lovelace-mushroom Ā· GitHub
Itās very strange. The 1.7.3 does exist. I donāt know why itās not listed in GitHubā¦ Release v1.7.3 Ā· piitaya/lovelace-mushroom Ā· GitHub
is there any way to use two entities on the light card? the problem is that i have smart light switch and then wifi bulbs, so to control the temperature/color of the lights i need to ācallā a new entity (the bulbs)
I guess you have to do 2 things first:
- change type of your switch to a light (screenshot)
- group those two wifi bulbs and the new light entity to a light group, also via helpers\group\light group
Now you should have an entity like light.palhacas_light_group and you can choose that new entity for your mushroom light card. The color/temperature changes done will of course only effect the lights of that new group that have options to do so.
I for example have have a ceiling light with zigbee bulb, 2 nightstand light with zigbee bulbs and 1 smart switch with a lamp attached and just do with it what youāre trying to do.
Thanks for looking into it. Thatās exactly the behaviour Iām seeing. It can already be done with the Mushroom Fan Card, which has an option to animate the icon when the fan is on.
I think itās just a case of targeting the correct specific element for the rotation (i.e. just the icon and not the whole chip). So rather than applying the animation to āha-cardā I think it should be further down the element path, but Iām not familiar enough with CSS.
Thanks for the idea! Butā¦ i tried that but the light doesnt respond to the color chage or the brightness, they work through wifi, maybe the time they take to reconnect, but i already waited to see if they respond but nothing, im going to try some mix ups!!!
What have you tried? Changing the device type and the light group?
Of course, whatever light is behind theat switch wonāt be affected by any brightness or temperature change because the that switch you made into a light entity will not magically become a dimmer.
My hint to these light groups was only to show that you could at least have all 3 lights to switch on/off on a light card AND use brightness/temperature toggle for the two wifi lights.
Andā¦while off no light will react to a change of brightness.
i think i expressed myself wrong, the smart switch that i have is for turning on and off the wifi bulbs that i have, so for on/off i just need to have the entity of the switch, what i like to do is add in the same card the possibility of adding a 2 entity to control the temperature/brightness of the bulbs (that the first entity turns on/off)
I just republished the 1.7.3. I didnāt known why it was not visibleā¦
What about setting up a vertical stack card with a conditional card. First card would be an entity card for the actual light switch, then second would be a conditional card that displays the wifi bulbs light card when the switch is on. On that light entity card for the bulbs you could then enable the color picker, dimmer, etc.
Just thinking out loud, but it would be a quick way around your issue for now.