Editing
Home Assistant
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Text==== ====="alignment":0===== The align property sets the alignment of the text within an object. (Label, button, etc). :0: Left alignment :1: Right alignment :2: Center alignment ====="bg_color":"#2C3E50"===== This property sets the color of the background of the object. You may use any hex number for the color, or most of the named colors.<br> Here is a [[Home_Assistant#Color_Palette|sample palette.]]<br> {{template:top}} ====="bg_opa":0===== bg_opa refers to the background opacity of an object. This property allows you to adjust the transparency of the background of an object. A higher value means the background is more opaque, while a lower value makes it more transparent. This can be useful for creating layered visual effects or for making certain elements stand out more than others {{template:top}} ====="toggle":===== The "toggle" property in openHASP controls whether a button acts as a toggle switch or a normal button. When "toggle" is set to true "toggle":true), the button acts as a toggle switch. The button sends out the old value in the down event and the new value in the up event when released1. For example, when toggling on, it sends {"event":"down","val":0} followed by {"event":"up","val":1}1. When toggling off, it sends {"event":"down","val":1} followed by {"event":"up","val":0}1. If "toggle" is set to false, the button acts as a normal button. Normal buttons send touch events while they occur. For example, a short touch sends {"event":"down"} followed by {"event":"up"}. A long press sends a sequence of events: {"event":"down"}, {"event":"long"}, multiple {"event":"hold"}, and finally {"event":"release"}. {{template:top}} =====data{}===== These are functionally identical" <nowiki>#{"page":2,"id":1,"obj":"dropdown","x":10,"y":150,"w":200,"h":60,"options":"Office\nDesklight\nWorklight"} - obj: "p2b1" # dropdown event: "changed": - service: homeassistant.toggle data: entity_id: > {% if text == "Office" %} switch.officelight {% elif text == "Desklight" %} switch.steve_desklight_relay_2 {% elif text == "Worklight" %} switch.kim_worklight_relay {% endif %}</nowiki> <nowiki>#{"page":2,"id":1,"obj":"dropdown","x":10,"y":150,"w":200,"h":60,"options":"Office\nDesklight\nWorklight"} - obj: "p2b1" # dropdown event: "changed": - service: homeassistant.toggle data: {} target: entity_id: > {% if text == "Office" %} switch.officelight {% elif text == "Desklight" %} switch.steve_desklight_relay_2 {% elif text == "Worklight" %} switch.kim_worklight_relay {% endif %}</nowiki> {{template:top}}
Summary:
Please note that all contributions to Notebook may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Notebook:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Home Page
C++ Reference
ESP Hardware
ESPHome
Home Assistant
Network Stuff
Tools
What links here
Related changes
Special pages
Page information