- Posts: 373
- Thank you received: 3
Simple but Effective (Scripts)
- bitzerjd
- Topic Author
- Offline
- User
-
Less
More
11 months 2 hours ago #4434
by bitzerjd
Simple but Effective (Scripts) was created by bitzerjd
FYI
I have a few lights that I toggle on/off with my remote. Unfortunately, I also have been redoing my Zigbee networks so the ID's will change. No big deal, update the device, wait for it to populate in myServer and do the updates. Or... I now call a script that is a simple "If, then, else script". If light on, turn it off, else, turn it on.
Calling the script instead of the device means that all the edits happen in Home Assistant. MyDesigner updates are unnecessary. I can easily change or modify the script and it works right away.
Hope it helps some of you out there in Allonis world!
I have a few lights that I toggle on/off with my remote. Unfortunately, I also have been redoing my Zigbee networks so the ID's will change. No big deal, update the device, wait for it to populate in myServer and do the updates. Or... I now call a script that is a simple "If, then, else script". If light on, turn it off, else, turn it on.
Calling the script instead of the device means that all the edits happen in Home Assistant. MyDesigner updates are unnecessary. I can easily change or modify the script and it works right away.
Hope it helps some of you out there in Allonis world!
Please Log in to join the conversation.
- aa6vh
- Offline
- User
-
Less
More
- Posts: 108
- Thank you received: 7
10 months 4 weeks ago #4435
by aa6vh
Replied by aa6vh on topic Simple but Effective (Scripts)
I am not sure that would help me much. When I want a light on, I want it on. I do not care what state it currently is, I just want it on.
Please Log in to join the conversation.
- bitzerjd
- Topic Author
- Offline
- User
-
Less
More
- Posts: 373
- Thank you received: 3
10 months 4 weeks ago #4436
by bitzerjd
Replied by bitzerjd on topic Simple but Effective (Scripts)
There is one button on the remote (Chair Lamp Toggle). The button points to a script instead of the actual device. Tap the button and it turns on or off. I use single buttons in order to save real estate on the remote. I don't want a "ON" button and an "OFF" button.
The benefit is that if the entity changes in Home Assistant, you don't have to update anything on myDesigner or myServer. All the actions are in the script on Home Assistant.
The benefit is that if the entity changes in Home Assistant, you don't have to update anything on myDesigner or myServer. All the actions are in the script on Home Assistant.
Please Log in to join the conversation.
- aa6vh
- Offline
- User
-
Less
More
- Posts: 108
- Thank you received: 7
10 months 4 weeks ago #4437
by aa6vh
Replied by aa6vh on topic Simple but Effective (Scripts)
It is an individual choice, of course.
I use a short press or long press to generate discrete power on or power off commands, for the physical buttons.
For the "soft" screen buttons, I do something different. I have a separate "Shift" button (its sticky, and changes color when set) that sets a global user variable. When a soft button is pressed, the executed macro code will do an If statement based on that shift global user variable (and the shift user variable is automatically reset). So I save real estate, but still have the discrete buttons.
I use a short press or long press to generate discrete power on or power off commands, for the physical buttons.
For the "soft" screen buttons, I do something different. I have a separate "Shift" button (its sticky, and changes color when set) that sets a global user variable. When a soft button is pressed, the executed macro code will do an If statement based on that shift global user variable (and the shift user variable is automatically reset). So I save real estate, but still have the discrete buttons.
Please Log in to join the conversation.
- bitzerjd
- Topic Author
- Offline
- User
-
Less
More
- Posts: 373
- Thank you received: 3
10 months 4 weeks ago #4438
by bitzerjd
Replied by bitzerjd on topic Simple but Effective (Scripts)
Cool idea, the Shift button. I need to try that!
Please Log in to join the conversation.
- aa6vh
- Offline
- User
-
Less
More
- Posts: 108
- Thank you received: 7
10 months 4 weeks ago #4439
by aa6vh
Replied by aa6vh on topic Simple but Effective (Scripts)
For my soft buttons that respond differently with the Shift key, I use a two level button label:
On<br>Off
Where the top label indicates what the unshift button does, and the bottom level label indicates the Shift behavior. I put the shift behavior below, as I decided it looked better to me. (Be careful using html tags in the label text fields though, as certain html tags will cause the designer to completely munge that screen html file!)
On<br>Off
Where the top label indicates what the unshift button does, and the bottom level label indicates the Shift behavior. I put the shift behavior below, as I decided it looked better to me. (Be careful using html tags in the label text fields though, as certain html tags will cause the designer to completely munge that screen html file!)
Please Log in to join the conversation.
Time to create page: 0.192 seconds