Open drashish87 opened 1 year ago
Hi
does setting work?
variables:
ulm_card_vertical_button_state: 'normal'
Hi
does setting work?
variables: ulm_card_vertical_button_state: 'normal'
Thank you for replying I tried your advise, the button still isn't changing colour and is still greyed out :(
So this code works great in Mushroom UI
- type: custom:mushroom-template-card
primary: Normal
secondary: ''
icon: mdi:wind-power-outline
icon_color: |-
{% if states['fan.smart_fan'].attributes.preset_mode == 'normal' %}
blue
{% else %}
grey
{% endif %}
layout: vertical
tap_action:
action: call-service
service: fan.set_preset_mode
target:
entity_id: fan.smart_fan
data:
preset_mode: normal
But struggling to replicate in Minimalist UI
This code keeps the icon grey irrespective fan is on or off
variables:
ulm_card_vertical_button_state: 'normal'
variables:
ulm_card_vertical_button_state: on
ulm_card_vertical_button_color: >
[[[
if (states['fan.smart_fan'].attributes.preset_mode == 'normal'){
return 'blue';}
return 'theme'
### 'theme' is the grey color variable in minimalist
]]]
Any idea how to make vertical card understand the mode the fan is on and to only change the colour based on the mode active?
Sorry to open a thread but the old one was closed and solution dint work unfortunately. I have been trying for over 3 days without success in getting Fan card to work properly. I have 4 modes in my fan. Normal , natural, sleep and auto. I want them to be coloured only based on the current mode the fan is working on so that by glancing i know which mode the fan is on currently. I would like to set Normal - blue , natural - yellow, auto - green and sleep purple coloured.
I am trying to recreate my Mushroom fan card with correct code & colour like this
In minimalist UI but unable to get the icons to show colour.
Can someone please advise what I am doing wrong. I have tried this code
Give this error
This code works
But button is greyed out. I would really appreciate someone can advise on this.