I have no problem adding for light switch or cameras as they are straight forward, however I’m struggling with Fan mode.
I have a ceiling fan which set it as Speed 3, Speed 2, Speed 1, Off.
By breaking them individually into widget, it works. but the problem now is
e.g.
Execute Speed 3, (fan speed 3 activated) and icon lighted in green.
Execute Speed 2, (fan speed 2 activated) and icon lighted in green, but Fan speed 3 icon still lighted in green.
Is there anyway to group them or use if else command? so that after select 1 speed, the others speed icon will turn off.
you could create an input slect that choses 1 of your options or an input number that sets the number.
connect it to the fan with an automation and use that in the dashboard.
After working for days, finally got your recommendation setup completed. I can use them normally however surface 1 error which not sure which causing it.
The fan component is different from climate (there is no temperature setting or display).
The services we need are fan.set_speed, fan.turn_on and fan.turn_off.
The complication is that speeds can vary from one fan platform to another. eg. Xiaomi air purifier (off, idle, auto, favorite) versus a normal ceiling fan (low, medium, high). So the slider will need logic to convert numerical slider value to one of the speeds (eg/ 0-33%= low, 34-66: medium and 66-100: high).
On second thoughts, maybe slider isn’t the easiest option. Fan speed is an input_select effectively (not numeric value) so maybe it makes sense to have a fan speed selector widget similar to MODE widget for set_speed and a fan switch widget for turn_on and off (the standard switch widget works fine so no work needed here). The difference from MODE would be that this single widget should be able to cycle through all options for the fan speed input select.
Can we use your input_select widget as a workaround in the meanwhile? How can it be used to point at fan.set_speed?
you can create an input_select with the right options.
then an automation that sets the fan speed when you change the input_select.
then you can use the input_select widget.
like you show it, its a combo from a switch and a input_select in HA also.
i dont think i have the option to read out the settings from the fan entity, so they would need to be set in the widget anyway.
the only real advantage that could be gained by making such a widget is that it puts 2 elements in 1 widget.
i already created a switch/slider widget, i could think about creating a switch/select combo
i will put it on my todo list, but i can take a while, because its not something i use and because its a very small advantage.
if it takes a while then please remind me at some point.
I’ll appeal to your trekkie side. The needs of the many outweigh the needs of the few.
PS. That LCARS skin looks bitching and I would totally use it if it weren’t for my SO. She’s not a Trekkie. I still have managed the transporter sound as my doorbell, though. Small victories.
tell her that you can put way more information and button on a lcars dashboard.
create a sensor that gives her a sweet message every day and put that on the lcars skin.
find out what she likes and make that only work with lcars
there are always ways to win your partner over to your side.
it helps when you present yaml code as code.
only then its readable.
for icon_on you provide 2 icons. which wont work.
i dont see the option warn anywhere in the docs.
icon_style_active will only be used at the moment the widget is active.
the state that is given as active is set by using “mode” https://appdaemon.readthedocs.io/en/latest/DASHBOARD_CREATION.html#mode
you use the mode widget to select a state from an input_select, but the only state shown is in the state text.
i think you are better off with the input_select widget.
“it helps when you present yaml code as code.
only then its readable.” The minute i learn how to do that i will, it will help if it was explained somewhere here for us basic computer users. I just don’t know how.
From the docs examples under " Detailed Widget Definition"
garage:
widget_type: switch
title: Garage
entity: switch.garage_door
icon_on: fas-car
icon_off: fas-car
warn: 1
Since the switch widget reference doesn’t list it I have no idea what it does.
“for icon_on you provide 2 icons. which wont work.” Actually it does work if i remove the last 3 lines of code, the icon will spin and change color. Obviously then the fan won’t receive the service call.
i dont know where they have put it now, but there has been a link to how on top of the forum, for ages.
when you type text on a browser, you have the place where you type text, at the top of that there are several options to change the text format, 1 of them is for code.
you can also use 3x on an empty line, before and after your code. (works here, in github, on discord and lots of other places.) and its and not ’ or "
you cant take options from 1 widget and use them in others. every widget has its own specific options. so if you find something in switch, then thats for switch only.
a widget recieves a service call when its supposed to. not setting the service call (which is nowhere documented) will make that the widget calls the service that it supposed to call
i didnt know that mdi used it that way, i thought it was used differently.
its obvious that it wont spin, because you change the value right after you have activated.
and you didnt set the mode.
you try to use a widget that is designed to activate a script to change an input_select
allthough it seems possible, you probably better use the input_select widget, because then you dont need the state part to show which state is activated.
and you got the option to turn it off when you are at low, without the need to go to medium and high.
I understand what you are saying about taking options from 1 to use in others or about the service call but i needed a solution and the input select won’t give me a fan icon for my fan
and I don’t mind going thru all the speed because that’s how I have on HA Lovelace.
You said that “its obvious that it wont spin, because you change the value right after you have activated.” do you know how to make it spin then? will be nice thought.
I have spend a lot of time trying to understand what’s on the docs and make things work with my limited knowledge. I know the docs don’t have examples for some of the widgets and some of the options have no explanation like “mode”, “warn” or “container_style” so I try and error until it works or i like it.