Replies: 4 comments 1 reply
-
This could probably be done relatively easily using the HTTPClient library like this: |
Beta Was this translation helpful? Give feedback.
-
What I ended up doing is changing the switch to a button and then configuring it in node-red to check the state of the light and turn it on or off as needed. this is the code how i changed it to add the power symbol. lv_label_set_text(menuLabel, "Bar Lights"); |
Beta Was this translation helpful? Give feedback.
-
Hi @ramonflores08 - this is similar to what I'm trying to achieve, ie. a toggle instead of a switch, being a non-coder I find the code quite un-intuitive! In my case I was publishing an MQTT message to turn power on like "omote/power_on" and one to turn off "omote/power_off" but the problem is the remote doesn't know the current state and defaults to off so they get out of sync. I'm using Home Assistant to trigger on/off actions when it sees the relevant MQTT messages, but I will copy your power button idea and simply use the toggle action in HA. Thanks! I'm also keen to get the Battery charge % display working - how did you do that? I tried un-commenting out this line of code lv_label_set_text_fmt(objBattPercentage, "%d%%", battery_percentage); ..but it didn't really work - just flashed up random percentages |
Beta Was this translation helpful? Give feedback.
-
Is there currently any method for creating Get/Post requests? IF not, it may be a good idea to be able to add this, It could allow some users to send at least a few simple commands if they don't have some external Homeassistant/other automation system to bridge that gap.
Beta Was this translation helpful? Give feedback.
All reactions