Still on 2022.3, so for now I do it in yaml till I upgrade to 2022.4
What did you use for the picture cards in the mainscreen? Like ‘Woonkamer’ , ‘Kantoor’ etc?
Cheers,
P
Are there any plans for implmenting input_number respectively helper in mushroom?
A simple slider for input helpers would be great. I hope that this is something that could be implemented.
It would be great if there is something like this:
I created this with a card mod, but i have a problem with the css. There is a gap:
I confirm, I also have this error.
Just update to the latest mushroom version 1.6.2. It’s fixed.
Thanks, in v1.6.2 the alarm panel works fine.
Edit: Still, not everything is correct. everything works fine in the PC browser, but not in the android and iphone app.
Hi,
There’s an option to align the cards (Icon and text) to right for RTL language?
Thank You
I’ve got a smart plug connected to my pool pump. When its running it draws 500w and when its idle its about 1w. I’d like to be able to change the icon color and the text displayed so when its on its red and says “Pump On” and when its off green and it says “Pump Off”.
I’m trying to do the icon color first, but even though I’ve confirmed the value in dev tools/states, nothing changes.
Can someone advise what’s wrong with my code?
Thanks!
type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.meross_pool_pump_power
title: Pool Pump
icon_color: |-
{% if states.sensor.meross_pool_pump_power | int < 100 %}
green
{% if states.sensor.meross_pool_pump_power | int >= 100 %}
red
{% else %}
red
{% endif %}
Do you get the value you’re expecting if you plug in your template to the template section of developer tools?
Here’s what I’m using to change icon color from the UI
Just plugged this into icon color field. I’m still pretty green when it comes to templates so this may not be the best way to do it but it’s working for me so far.
Also, I’m using template cards/chips quite a bit for these as they seem to offer a lot of flexibility
{% set state=states(entity) %}
{% if state<'45' %}
green
{% elif state>='45' %}
red
{% endif %}
That more likely coincedence that it actually “working”…
{% set state = states(entity) | int %}
{% if state <= 45 %}
green
{% elif state >= 45 %}
red
{% endif %}
States are always strings. When you try to use mathematical comparisons on strings you can end up with weird results. So it is important to convert your state to an actual number by using | int
or | float()
and to make sure you are comparing it to a number 45
, not a string '45'
.
For example, all of the follow will render as FALSE because it is performing a string comparison, not a traditional numeric comparison:
{{ '2' <= '100' }}
{{ '6500' <= '55000' }}
{{ '540100' >= '551' }}
This may explain the issue I"m having with one of them behaving oddly then
Thanks, I’ll have a look at converting them
Tested this code and it comes back with the value ‘green’ even though the state is showing 559.
{% set state = states('sensor.meross-pool_pump - power') | int %}
{% if state <= 45 %}
green
{% elif state > 45 %}
red
{% endif %}
This is not a valid entity_id
, so your variable state
is equal to 0… which is less than 45. So “green” is the correct return value.
Sorry, I used the name rather than the entityid. I didnt think it was an issue because it was in quotes. Put the correct entityid in and now it resolves to red. Thanks!
While the code works in the template, it doesnt actually change the chips icon color.
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: sensor.meross_pool_pump_power
icon_color: |-
{% set state = states('sensor.meross_pool_pump_power') | int %}
{% if state <= 10 %}
green
{% elif state > 11 %}
red
{% endif %}
Use a template chip instead of an entity chip
Hi guys ,
I have installed mushroom from hacs and can’t get to work properly.
I would like to start with the chip card and still I got the blue top line with menu and the 3dots.
So in this scenario I got 2 menu:
What am I missing here? The mushroom theme also enabled.