Thanks…
I managed to get it to work.
I had to move it to text_sensor and do the if in ESP-Home as you suggested.
Thanks…
I managed to get it to work.
I had to move it to text_sensor and do the if in ESP-Home as you suggested.
I need some help on how to create a “delay” of say 30 minutes or one hour and be sure that the action is carried out if not on time then when HA has booted up if there was a restart.
I know how I would do it in HA, just add datetime helper and use the if now() timestamp > datetime timestamp.
But how do I set a datetime helper from ESP-Home? Is there a better way to do the above task?
Here is what I currently have (big thanks to all the great contributors who I have copied from (Marc, Blakadder and Masto):
So here I selected the kitchen, and I can see the current temperature is 24.2 and the set temperature is 22.
If I click on a different room then then target temp is changed accordingly:
The selected room is sent to HA in a input_text. So I have input_text.selected_room is “kitchen”.
Now I want to be able to set a boost with the fire icon for 30/60 minutes (not sure which yet).
But is the best method to send it to HA input_datetime.kitchen_boost {{ now + 30 minute }}?
How do I get {{ now }} in ESP-Home?
Is there a better alternative?
EDIT:
I think I have found the easiest solution. I’ll fire a HA script from ESP-Home. That way I can use yaml to do the hard work and don’t need more ESP-Home code than bare minimum.
yes i 1st started trying to keep everything within the esphome yaml, but with this device having limited memory i agree that doing as much as possible in HA is the smart choice. I would use a global to store which room is selected then send that back to HA as an input_number, then in HA run your script with the “if” statements, very similar to how you achieved it.
I’m currently working on a different ui with less pages than my old project, trying to squeeze more things on the home page as i don’t want to scroll pages to get to my thermostat controls. it’s looking a bit too cluttered atm
i gotta find a compromise
Another advantage of doing things in HA is you can then use them in Lovelace for example, and keep them synchronised across devices. I use Node Red (as I mentioned above) as it allows fairly complex automations to be developed more easily - I think!
what you think? on the right i will have a circular progress bar and heating temps.
edit: i swapped image to a screenshot, photo’s never do it justice … the thick black border on the right is under the bezel, so everything is centered. hot water temp top right…
edit2: the top section is like a status bar, icons for states on etc.
I’ll have only 2 other pages then, lights and music.
I just realized something.
Perhaps this is old news to all of you but if you add a hotspot on a page and make no connection to it at all in ESP-Home then you still get this:
ESP-Home still knows a component has been clicked on. What if we could add a sensor to pass this message to Home Assistant?
That would mean we could do all the actions in HA and minimize the yaml in ESP-Home.
Perhaps this could diet our yamls enough to make most of us happy?
I’m reading this:
Is this perhaps a possible connection between the ESP-Home logger → HA?
this is the nextion display just sending those events to the esp32, you would need to then create a component to send the data back to HA which is basically what we do anyway (the more components exposed to HA the more memory it takes up). this is how I see it working anyway.
It probably is, but the difference is that we create one sensor for each component we add.
What if we have just one sensor that captures anything the nextion display says and just pass it along to a sensor in HA.
That way we have one sensor in ESP-Home and one sensor in HA and all actions are carried out by HA automations that reads the sensors state.
Kind of like how the android Last notification sensor works.
It just passed the info to HA and we can react to it in HA.
Right now I have 16 hotspots that I have yaml sensors for, and I know I need to add probably 5-6 more.
If the above would be implemented then I would just need one sensor.
I think I may have found a way.
I wrote all the yaml now in the morning in a hope that I could test it before work, but sadly my yaml got to big with this added and now I need to open it up and flas via cables.
So if anyone wants to try what you get from the debug messages → HA then this possibly could work, but it’s untested.
It could compile fine at least.
I just kept the message from the logger example since I didn’t know what parts was interesting and publish it to a helper in HA.
logger:
baud_rate: 0
level: DEBUG
logs:
sensor: WARN
resistance: WARN
text_sensor: WARN
ntc: WARN
on_message:
level: debug
then:
- homeassistant.service:
service: input_text.set_value
data:
entity_id: input_text.ns_kitchen_debug
value: !lambda |-
return "Triggered on_message with level " + to_string(level) + ", tag " + tag + " and message " + message;
I flashed it again and tried with a few settings, but not even VERY_VERBOSE logging sent the data we want.
logger:
baud_rate: 0
level: DEBUG
logs:
sensor: WARN
resistance: WARN
text_sensor: WARN
ntc: WARN
on_message:
level: VERY_VERBOSE
then:
- homeassistant.service:
service: input_text.set_value
data:
entity_id: input_text.ns_kitchen_debug
value: !lambda |-
return "Triggered on_message with level " + to_string(level) + ", tag " + tag + " and message " + message;
results in these kind of messages:
I honestly think this is a thing that should be developed in ESP-Home since it could really help with Nextion displays.
looking here we could make a custom sensor class with multiple sensors. so one component for as many sensors we want.
I’m going to try this approach and see how it works.
I’m not sure I understand how that is going to work.
But give it a go, I hope you succeed
This is a lovely UI. Is there any way to use this TFT with an ESPHome flashed NSPanel?
I think he’s on here Unofficial Nextion User Forum
I submitted a feature request to pass the touch messages to HA.
No you need tasmota firmware on esp of the nspanel. but i recommend you try its really nice layout and look and feel of HA and easy change the config if you want to add or remove entity’s without rebuilding the tft file all the time. I think its the best setup i saw so far for the nspanel. And developer is really helpful guy he always answer questions on discord. if you like his development consider to buy him a coffee he really deserves it.
Thank you for the guidance. I flashed with Tasmota and after working through a couple of config issues I have the panel up and running. It is my first foray into Tasmota and AppDaemon so it was a great learning experience as well.
Can I get a little help understanding how these two different temp attributes are pulled in differently? In Tasmota they both show as Celsius but in HA the ESP temp is automagically converted to Fahrenheit with the proper device class but it looks like the ambient temp sensor is just an integer.
How can I get them both represented in HA as Fahrenheit?
Thanks!