Please help with low temperature notification

Every entity’s state value is a string (i.e. text).

Even if a temperature sensor’s value is numeric like 35.4, it’s actually handled as a string (meaning a sequence of characters consisting of the three digits 3 and 5, a period, followed by a 4). In other words, it’s not interpreted as a floating point number.

The purpose of the float() function is to convert the string to a floating point number. The int() function is for converting a string to an integer.

float(0) means convert the supplied string to a floating point number but if you cannot (because the supplied string is non-numeric) then report 0 as the value.

The states() function reports an entity’s state value. So this template means “get the state value of sensor.govee_1_breezeway_temperature, convert it to a floating point number and test if it’s less than 60”.

{{ states('sensor.govee_1_breezeway_temperature') | float(0) < 60 }}

my guess is that I have a formatting problem or something stupid, because it reports normal and then the time just keeps counting up and never reports again.

If you created the Template Binary Sensor using the UI, did you wrap the template in double quotes? If you did then remove them. Look closely at the screenshot I posted above (there are no double-quotes).

yup, that was it. I swear, I read someone else say the exact same thing about this topic somewhere else. dang. ok, off to see about adding the notifications integration, thanks.

The Alert integration is configurable exclusively via YAML so you’ll need to add it to your configuration.yaml file and then restart Home Assistant in order to load it.

The Alert integration’s documentation includes examples but let me know if you get stuck.

1 Like

True, and it’s not elegant either. But my goal is to give a solution. With use he will find the caveats himself and that’ll organically make him look for and learn more advanced strategies.

So your teaching strategy is to knowingly suggest a subpar method so that novices will empirically discover its faults and seek a proper method.

That’s similar to using ChatGPT, except it does it unknowingly.

1 Like

I appreciated both solutions. For now I am continuing to use odwide’s solution until I have more time to fuss with the “proper” way. I’m grateful for the help you both gave and learned a lot yesterday, but alas, didn’t have another several hours to learn any more about the alerts part. For now it’s all working and I may also have the opportunity to learn what the shortcomings of odwide’s way was, but for now, it was definitely quicker and easier to implement, at least for me. I couldn’t figure out how to test the alerts yaml btw.

1 Like

The OP said it all.

The OP doesn’t know any better. That’s why they asked for help and will accept any expedient remedy, even if it’s a kludge.

Anyways, seeing that you adhere to this philosophy:

The next time you ask for assistance, I’ll remember to offer a solution that provides you with the same opportunity to find the caveats. :+1:

It’s working for him, and your solution, while more elegant, was found impractical for the moment. Don’t bury a less experienced user on stuff that’ll take him longer to figure out when there’s a plain solution that’ll achieve the same purpose.

And yes, I’ll prefer something simple that works over something pretty and complicated. Any needed adjustment will manifest by itself and prompt a more polished solution if needed.

They said they ran out of time and didn’t know how to test it. That’s not “impractical” that’s short of time and knowledge.

What I won’t do, and haven’t done for the past 5 years, is knowingly offer a subpar solution. It’s a philosophy that has served me well and the thousands of users I have helped.

1 Like

Precisely because time had precedence for him my solution was the “best” at that point. Later, when he deems appropriate, he will resort to yours or any other more polished.

Your absolutist point of view is inflexible.

That happens when you hold yourself to higher standards.

1 Like

And thus end up sacrificing practicality and ultimately, efficacy.

Can I ask you a personal question? Why do you do this? Seems like almost every day you wake up and say to yourself, I am going to go on the HA community and help people with their problems, and I’ve often wondered why some of you do it. Are you on the Nabu Casa payroll, or just out of the goodness of your heart or what?

I’m not on Nabu Casa’s payroll.

Nabu Casa’s employees are listed here but none are dedicated to answering a user’s questions on this forum (they have other responsibilities). Nabu Casa relies on unpaid volunteers to support Home Assistant’s users.

This community forum currently has over 215000 members but only a handful regularly answer questions, provide examples, and explain Home Assistant’s many features. You can get a sense of who they are from the forum’s Users page. The number of “Replies posted” is one metric but it’s coarse because not all replies are necessarily answers/explanations (this topic serves as an example). The number of solved problems is a better metric and tom_l is unquestionably the most prolific.

My involvement began over 5 years ago. I had home automation as a hobby for over a decade when I felt it was time to transition from the software I was using to Home Assistant. I initially spent a fair bit of time lurking on the forum and then opened an account in order to ask my first question. nickrout was first to reply with one of his characteristically terse and glib comments (don’t ever change :+1:t3:). It was petro who opened my eyes to the division between YAML and Jinja2 as well as the power of templating.

I’m not sufficiently proficient in python programming to make software contributions to the project so I decided that I would contribute by supporting others. Some people like Sudoku, I like solving home automation problems. It has also been a great learning experience because I often had to do research in order to solve someone else’s unique problem.

I have great respect for the other regulars who selflessly help others, often on a daily basis. Without their contributions, I doubt Home Assistant would have gained traction as rapidly as it did. Without prompt, knowledgeable support, a novice is likely to become frustrated to the point of abandoning it and moving on to something else (perhaps a commercial product like Hubitat).

tl;dr
Out of the goodness of my heart.

5 Likes