Hey there!! Looking for help creating a sensor I can pass through to esphome for a display.
I have a tide sensor which gives various information from which its definitely possible to guess how high the tide currently is. I just don't know how to do that in template code lol.
Two approaches I've thought of so far are to either figure out which of the given predictions is closest to the current time and then have it so anything above 4 displays high, below 2 displays low and 2.1 to 3.9 being middle.
Or to do it through the attributes that state when the next high and low tides are where if the time difference between the current time and the next high tide is less than 1 it shows high etc.
but I'm really new to all of this and do not understand how I take the data this sensor is giving me and turn it into something I can actually use in my display! Any help is super appreciated. π