Hello! I just recently bought a 7" fire tablet so I’m just beginning with AppDaemon & HADashboard. So far I have a basic dashboard set-up with a few widgets to control a Flux rgb led. For a lamp in my bedroom I have multiple widgets controlling the same led bulb as shown below
The second two widgets are just using the on_attributes to set the rgb_color. Both widgets work as expected IF the light is off when I press each it will turn on with the correct color set. Also as expected, pressing any of the three widgets while the lamp is on will turn it off.
Instead of having this, I would like to keep the first widget as the the lamp on/off and brightness control but have the 2nd two widgets just be a plain colored squares that I could press would change the color of the lamp.
I’m not really sure where to start.
Do I need a scene or an automation to trigger? I understand some basic concepts of programing but nothing specific to python. Is this something I would do directly with an AppDaemon app. I’ve also been looking at node-red. I’m starting with two colors but hope to add more once I understand how to get started. I hoping this would be relatively simple to get started with. I have no idea how to write the code but I think the logic would be like this
press red square
if lamp is off then turn turn on
set lamp to red (rgb_color: 87, 0, 0)
# But never turn the lamp off
set the lamp color in the first icon to red
press orange widget
if lamp is off then turn it on
set lamp to orange
# But never turn the lamp off
set the lamp color in the first icon to orange
#
@ReneTode Thank you! This does show me how change the widget look but I think I need to have a different widget_type to reach my end goal.
I didn’t mean to add a # in front of But never turn the lamp off in my OP. Maybe I made it confusing to understand my desired result. I don’t think I want the color widget (flux_01org) to be a default light widget. I think it needs to trigger an AppDaemon app or yaml automation or a scene or something. Please let me try explain again:
I do not want the color widget to turn the lamp OFF or control the brightness.
I would like for example to press the orange widget and the following things happen:
check if the lamp if the lamp is already on
if the lamp is ON then ONLY change the color to orange
Do Not turn the lamp off
Do Not change the brightness
if the lamp is OFF then
turn the lamp ON
change the color to orange
Do Not turn the lamp off
Do Not change the brightness
Can I do this by simply learning to create an AppDaemon app?
Do I need to first create something in Home Assistant that I call or trigger with HADashboard?
This is where I’m stuck. It seem like are multiple ways to achieve this but Im not sure what I all need to do.
Thank you! I think that’s what I needed to know. I’m gonna give it try using an app. If I understand what the apps can do correctly it seems like it will be time better spent learning that approach over automations because understanding how to build an app will allow for more complicated tasks down the raod
Good Morning!
Would you mind guiding me in the following? I am using a Widget “Alarm”. I would like to have the following: Widget background Green when alarm is disarmed, Red when Armed Away and Amber when Armed Home. I do not have strong experience at developing Apps as you show in your My-Appdaemon documentation. An example should certainly help me moving forward.
Best regards
thats by default not possible.
you would need to create a custom_widget and change things in the javascript.
it will be possible in a future version from appdaemon, but i cant give a timeframe for that now.