"Or pounds and ounces if you want to be weird" ... That deserves a subscription. When will those remaining few finally learn how much more logical the metric system is ...
@@adamklosterman8960 Yup, clearly a tiny minority. Some of them so stupid they'd even vote for a criminal idiot. That's actually the weird thing: it's not the British! Most of the time if some group of people just does not want to follow the rest of the world, it's the British. Ex. driving on the wrong side of the road. But even they have realized how ridiculous it would be to not use the metric system. Maybe that's the reason Americans resist ... they just do not want to do the same thing as the British? If that is the case, Brits suddenly have huge power ;-) Reverse psychology anyone?
Great idea as always, thank you! One improvement though. I don't see a reason why to calibrate it to measure weight of everything put onto it. If you put the water softener without any salt on it, you'd get 0 when the softener has no salt. With your current set up, you get weight of the softener, which the doesn't make sense in automations (like why is there the magic number 34kg as empty...). Then you can proceed and put a known weight on it to have the second value. But I'd recommend just fill it up to max, and calibrate that reading to 100. That way, you don't get weight, but percentage of your "filling". The same could be used for humidifiers etc.
Did something similar with my water softener, except using an ultrasonic sensor measuring the distance from the top. We use salt pellets, never seen them as bricks like that before! I have sensors configured for cm used, cm remaining, and % remaining. Then I put a gauge card up on the dashboard to show the remaining percent and two sensor cards for used/remaining cm which show the trend over time.
I was just thinking a simple optical solution would also work. A simple led emitter and a light sensor diode. When the salt block falls below the led light beam it completes the circuit, sending a voltage to a sensor wire.
Now, I don't have a water softener and I doubt I would ever need that specific device, but this video is all about how you make use of HA to make your home smarter.
This is brilliant and not something I had thought of! As you hinted at in the video, it should also allow you to track when / how often your softner runs a recharge cycle, which is also a useful thing to know. The tip about the ready made M5 Stack is also much appreciated!
Thanks Alan. I use a conditional badge on my dashboard for my dog's water bowl status. Using visibility, it only displays when it's below a certain level. I use a Yolink water sensor to monitor it. I need to create a template helper binary sensor entity to display the status in a friendlier format. It currently displays as either Wet or Dry but I'd prefer Full or Refill. A tip for displaying badges, in addition to the icon, you can display both the name and the state within the same badge. That way, you get a header (name) and its current state but the badge remains the same size, taking up less space on your dashboard. I use conditional badges for mail & package deliveries, Gate open/closed, recycle & trash bin reminders (night before and day of).
I see few suggestions of using distance sensors, and it looks reasonable at first sight. Ultrasonic or even laser range sensor definetely could show you actual height of the salt blocks. But when I think more about it more solutions come up to me. For example, you can use door closing sensor and put magnet on the top of the salt block while another part of sensor could be placed on the requiring alert level. Or you can construct some sort of mechanical trigger, for example just two electric contacts that circuit by something located on the top of salt blocks. When salt block gets lower cover on the top of it comes down and connects two contacts alerting you by ESP Home. Or you can use light crossing sensor instead of mechanical. Just put light emitter and reciever on opposite sides of the box at required level Yes, SmartHome is very interesting not only in programming but in engeneering as well. Especially if you have your own house instead of rent appartment)
I used a smart plug with energy monitoring. I have home assistant feeding into a mariadb. When the water softener is not recharging it uses very little power, but when it recharges there are a several spikes in usage. I can then look back at how often it spikes since I refilled it and then know I need to add more. ***** I LIKE YOUR METHOD. I'M ORDERING THE KIT NOW. Thank you for show me a better way.
I went through a phase of making my own sensors and getting them in ESPHome. I kind of gave up and went back to premade sensors as generally they look better, have battery options so cords are not running everywhere and just overall neater installs. Now that works with sensors you can buy off the shelf. Sometimes, like this weight sensor, you just can't buy one off the shelf so you have to DIY it and that is where the power of ESPHome or Tasmota (Depending what you like) come into their own.
@@HomeAutomationGuy I guess it depends on how long the batteries last. Sometimes hiding cables can be a pain, but I understand what your saying as well 🙂
@@EsotericArctos That's very true. I do use battery motion sensors in my hallways, because I can just blutack them to the ceiling and the batteries last two years in some cases!
And i have switched everything to zigbee - way more stable, lighter and without constant "updates" which breaking things. Hopefully that HA soon will die because this platform slowly killing idea of open source smart home platform.
To eliminate the fluctuating output data try doing 10 or 20 weight samples. Discard any samples that are out of the sample range, average the remaining data and then export the weight. You could also put a CT on the softeners AC input to see if it is running and maybe a flow sensor to see if the water is flowing and use this info to validate the output. Maybe verify that the softener is not on and no water flowing before taking a weight measurement. It took some modifications, but I was able to get pretty reliable readings from my inexpensive weights that I purchased on Amazon, under my RV propane tanks.
Man, wish you had done this vid months ago so I'd known of the M5Stack option. I spent a TON of time doing the same thing from scratch, to tell HA the remaining pints of beer in my kegs. It's working great, but was not easy getting there. Nice work.
@@HomeAutomationGuy Your 100% correct, it was very rewarding in the end and learned a lot, but I was closer than ever to giving up at one point. I was having major data fluctuations, but eventually figured out that 4 x 50kg load sensors was wrong for a 15 kg keg. Changing to 4 x 5kg solved my problem. Have an 8" tab at my kegs with a lovelace showing the labels and quantities of both kegs.
Instead of using weight, you could attach an ultrasonic sensor to the top of the lid of the salt section and use distance as a source of measurement instead of weight, similar to an ultrasonic water level indicator
@PiyushNikam This is what the manufacturer provides already(Called iLid), but runs their proprietary software. It runs on a button battery and connects to wifi to send measurements a couple of times a day.
Does anyone have any instructions on how to build the ultrasonic sensor? Using weight is not an easy option for me because the way my softener is hooked up to the water line, I don’t really have much play to be able to lift it and out the kind of scale under it.
you could add more data points to the filter, the curve is probably not entirely linear so, more weight more deflection on the load cell. that being said, since you're looking at weight reduction and that it's still just a water softener it's probably good enough with a pure linear filter.
Your idea is great, but I find it a bit complicated and expensive. You can use the HC-SR04 Ultrasonic Distance Sensor, to measure the distance from the device lid to the salt block. This sensor is small enough to fit in the battery compartment of the water softener.
Take a look at some of the other comments. People are using transducers to measure the distance from the top of the softener to the salt to determine how full it is. You could probably put a contraption like that into a waterproof housing
Hello brother I been watching your videos and learning so much about docker and home automation Thank you so much. I still have a lot to learn tho. I have a request for you, in one of your videos from about 2 years ago you ask your subscriber that if they have questions on a particular application you may make a video. I want to know if you are familiar with Zerotier software I currently run it on my Home Assistant OS and it works fabulous but I don't know how to install and configure as a docker container. My set up is a Mac mini 2012 running Ubuntu server latest version. The reason I do it this way its because I run Nextcloud on the same machine along with Docker. Thank you once again for the content you post we appreciate it very much. Cheers from California.
As accuracy is not critical here, a single load cell as one of 3 or 4 legs would also do here. That load cell will only get 1/3rd or 1/4th of the weight as the other legs will take the rest of it, but it would help further lower the BOM cost and might actually give less random noise than having to balance 4 sensors.
The whole reorder system was the reason I avoided Harvey, I used a ultrasonic sensor to detect the distance to work out how much was remaining. I wasn't sure if the water softener weight would change depending on water, so I opted for monitoring the distance.
I have set up a similar system of scales to weigh solvent tanks. They monitor rinse solvent to alert staff when its nearing empty and requires a refill. Otherwise its a guess due to no display on the tanks.
Thanks for the shoutout! However i dont deserve the credit, i totally stole the idea from some other project and adapted it to work on esphome. Just a thought, but did you try reverse engineering the built in sensor on your salt softner? That would be a fun project in the future.
Thanks for this. Great video. During your research were you able to find a more precise solution even if it were more involved or expensive? I've used threshold based solutions like this, and it covers almost all of my needs. However, there are a few applications where precise and consistent values would be super useful! Anyone have any suggestions on where to start?
I love it. It works really well. I did water hardness tests before and after, but you don't really need them. The results are immediately obvious to the naked eye. No more calc build-up on the taps and shower. Glasses are cleaner. Dishwasher salt lasts way longer.
How heavy is your water softener or what type of flat surface do you use? I tried 2.5cm thick wooden sheet (similar to the one on your video), but it bends too much in the middle if the weight is above 50kg and pressed the whole board against the floor in the middle where the weight module is. Afterall, thinkness of that module is nearly the same as that of the legs that are supposed to measure the weight. Wonder how you solved that challenge?
It weighs about 30kg and the floor is made of tile. My wood board is about 2.5cm and it doesn't flex enough to touch the floor. There is enough clearance under it for the module in my setup. I've got about 3-5mm
@@HomeAutomationGuy Thank you, Alan. Unfortunately my water softener is a lot heavier - it weighs over 100kg. Just the salt bag alone weighs about 25kg. And that flexes the wood board substantially. I will try a 4 or 5cm thick board. Hopefully that will resolve the challenge. I just wish that weights module wouldn't have to be under the board. At least there would be less risk it crushing to pieces if the wood board flexes too much over time putting rest of the weight on it.
@@ehajiyev Other commenters have used distance measurers at the top of their softener to measure the salt levels - perhaps that would work for one your size?
@@HomeAutomationGuy Indeed, I have seen that. It seems fairly straightforward too. But not sure what else would I use the electronic scales for then. However, I might give it a try if the wood board option doesn't work out. Once again big thanks for your ideas and suggestions. Love your videos.
I don't think using weight is a good idea, I have one of this unit at home, and another type of failure this unit have is a internal pipe leak which will cause the unit water lever to go way higher then it should If that happened your weight senses will unable to detect any problem as the unit will be fill with water weight I have this problem on myself when my unit is just less then a year old and need to call for repair
I have been reverse engineering the Mobile App and am able to log in successfully login and pull the values from the cloud servers. The next step is to make a custom_component for home assistant, but this wont be easy for me.
Hey @DTech101 , I have put together a custom component. Did you want to test it out for me? HomeAssistant now shows a Device with the following entities. Left Percent & Days Left Right Percent & Days Left Lid In Place Battery % Last Update DateTime
I use an Aqara motion sensor. I have placed this horizontally about 10 cm above my bed, about 40 cm to the side (mine is attached to a speaker). The motion sensor is facing upwards, mostly facing the wall. Only when I get up out of bed, it triggers the motion sensor.
Designing wifi devices in ESPhome is more tinkerer thing that functionality considering constant problems with this platform. Maybe one day someone will come out with platform without and HA influence - zigbee based without constant "improvements" and breaking changes.
"Or pounds and ounces if you want to be weird" ... That deserves a subscription. When will those remaining few finally learn how much more logical the metric system is ...
That 330+ million few.
@@adamklosterman8960 Yup, clearly a tiny minority. Some of them so stupid they'd even vote for a criminal idiot. That's actually the weird thing: it's not the British! Most of the time if some group of people just does not want to follow the rest of the world, it's the British. Ex. driving on the wrong side of the road. But even they have realized how ridiculous it would be to not use the metric system. Maybe that's the reason Americans resist ... they just do not want to do the same thing as the British? If that is the case, Brits suddenly have huge power ;-) Reverse psychology anyone?
Great idea as always, thank you! One improvement though. I don't see a reason why to calibrate it to measure weight of everything put onto it. If you put the water softener without any salt on it, you'd get 0 when the softener has no salt. With your current set up, you get weight of the softener, which the doesn't make sense in automations (like why is there the magic number 34kg as empty...). Then you can proceed and put a known weight on it to have the second value. But I'd recommend just fill it up to max, and calibrate that reading to 100. That way, you don't get weight, but percentage of your "filling". The same could be used for humidifiers etc.
Did something similar with my water softener, except using an ultrasonic sensor measuring the distance from the top. We use salt pellets, never seen them as bricks like that before! I have sensors configured for cm used, cm remaining, and % remaining. Then I put a gauge card up on the dashboard to show the remaining percent and two sensor cards for used/remaining cm which show the trend over time.
What was the brand or item number that you used for the supersonic sensor? I find it interesting
@@jig1056 I used HC-SR04
I was just thinking a simple optical solution would also work. A simple led emitter and a light sensor diode. When the salt block falls below the led light beam it completes the circuit, sending a voltage to a sensor wire.
But of course my idea would simply tell you when it is time to replace, you wouldn't be able to track historical usage.
Measuring the brine is another solution but that’s probably too late, especially if you don’t have salt at your disposal.
Thanks, now I have to go order 7 of these for all the ideas you just gave me 😊
Start with one! Then see if it works for you 🤣
Thanks so much for this tutorial. Got me up and running quickly, and my dog's water bowl will never run dry again!
Oh well now, that's a darn good idea! I might steal that! 🐕💡
Now, I don't have a water softener and I doubt I would ever need that specific device, but this video is all about how you make use of HA to make your home smarter.
This is brilliant and not something I had thought of!
As you hinted at in the video, it should also allow you to track when / how often your softner runs a recharge cycle, which is also a useful thing to know.
The tip about the ready made M5 Stack is also much appreciated!
For $14 it's worth getting the kit. It was plug and play!
Thanks Alan. I use a conditional badge on my dashboard for my dog's water bowl status. Using visibility, it only displays when it's below a certain level. I use a Yolink water sensor to monitor it. I need to create a template helper binary sensor entity to display the status in a friendlier format. It currently displays as either Wet or Dry but I'd prefer Full or Refill. A tip for displaying badges, in addition to the icon, you can display both the name and the state within the same badge. That way, you get a header (name) and its current state but the badge remains the same size, taking up less space on your dashboard. I use conditional badges for mail & package deliveries, Gate open/closed, recycle & trash bin reminders (night before and day of).
I see few suggestions of using distance sensors, and it looks reasonable at first sight. Ultrasonic or even laser range sensor definetely could show you actual height of the salt blocks. But when I think more about it more solutions come up to me.
For example, you can use door closing sensor and put magnet on the top of the salt block while another part of sensor could be placed on the requiring alert level.
Or you can construct some sort of mechanical trigger, for example just two electric contacts that circuit by something located on the top of salt blocks. When salt block gets lower cover on the top of it comes down and connects two contacts alerting you by ESP Home.
Or you can use light crossing sensor instead of mechanical. Just put light emitter and reciever on opposite sides of the box at required level
Yes, SmartHome is very interesting not only in programming but in engeneering as well. Especially if you have your own house instead of rent appartment)
I used a smart plug with energy monitoring. I have home assistant feeding into a mariadb. When the water softener is not recharging it uses very little power, but when it recharges there are a several spikes in usage. I can then look back at how often it spikes since I refilled it and then know I need to add more. ***** I LIKE YOUR METHOD. I'M ORDERING THE KIT NOW. Thank you for show me a better way.
I'm glad it was useful! My water softener doesn't use any power, so I wasn't able to use a method like this
I went through a phase of making my own sensors and getting them in ESPHome. I kind of gave up and went back to premade sensors as generally they look better, have battery options so cords are not running everywhere and just overall neater installs. Now that works with sensors you can buy off the shelf. Sometimes, like this weight sensor, you just can't buy one off the shelf so you have to DIY it and that is where the power of ESPHome or Tasmota (Depending what you like) come into their own.
Interesting! I'm trying to move away from battery sensors as replacing them annoys me and surely isn't great for the environment
@@HomeAutomationGuy I guess it depends on how long the batteries last. Sometimes hiding cables can be a pain, but I understand what your saying as well 🙂
@@EsotericArctos That's very true. I do use battery motion sensors in my hallways, because I can just blutack them to the ceiling and the batteries last two years in some cases!
And i have switched everything to zigbee - way more stable, lighter and without constant "updates" which breaking things. Hopefully that HA soon will die because this platform slowly killing idea of open source smart home platform.
To eliminate the fluctuating output data try doing 10 or 20 weight samples. Discard any samples that are out of the sample range, average the remaining data and then export the weight. You could also put a CT on the softeners AC input to see if it is running and maybe a flow sensor to see if the water is flowing and use this info to validate the output. Maybe verify that the softener is not on and no water flowing before taking a weight measurement. It took some modifications, but I was able to get pretty reliable readings from my inexpensive weights that I purchased on Amazon, under my RV propane tanks.
Man, wish you had done this vid months ago so I'd known of the M5Stack option. I spent a TON of time doing the same thing from scratch, to tell HA the remaining pints of beer in my kegs. It's working great, but was not easy getting there. Nice work.
It may have been hard work for you, but did you at least have fun and learn a lot? Sometimes the hard ways are the most enjoyable 😉
@@HomeAutomationGuy Your 100% correct, it was very rewarding in the end and learned a lot, but I was closer than ever to giving up at one point. I was having major data fluctuations, but eventually figured out that 4 x 50kg load sensors was wrong for a 15 kg keg. Changing to 4 x 5kg solved my problem. Have an 8" tab at my kegs with a lovelace showing the labels and quantities of both kegs.
Instead of using weight, you could attach an ultrasonic sensor to the top of the lid of the salt section and use distance as a source of measurement instead of weight, similar to an ultrasonic water level indicator
That's exactly what I was about to suggest.
I'd be curious how long it would last before it corrodes. They're cheap enough to replace though I suppose.
@PiyushNikam This is what the manufacturer provides already(Called iLid), but runs their proprietary software.
It runs on a button battery and connects to wifi to send measurements a couple of times a day.
Could use a Time of Flight sensor. Should be lesser prone to corrosion than an ultrasonic sensor.
Does anyone have any instructions on how to build the ultrasonic sensor? Using weight is not an easy option for me because the way my softener is hooked up to the water line, I don’t really have much play to be able to lift it and out the kind of scale under it.
you could add more data points to the filter, the curve is probably not entirely linear so, more weight more deflection on the load cell. that being said, since you're looking at weight reduction and that it's still just a water softener it's probably good enough with a pure linear filter.
I’ve been using a time of light sensor coupled to an ESP32 at the top of my salt pellet tank, works a treat with notifications at 6% 👍🏼
Sorry, what's "time of light"?
Presume they mean "time of flight". Measures distance by timing how long light takes to hit an object
@@SBinVancouver yes sorry time of flight..
Sounds interesting, do you have any instructions on how to implement?
This is great! I really need to experiment more around these Esp32 sensors I have several lying around being useless.
It's quite a rabbit hole. But I'm loving the ability to make my own multi-sensors so I only need one multi function device per room.
Your idea is great, but I find it a bit complicated and expensive. You can use the HC-SR04 Ultrasonic Distance Sensor, to measure the distance from the device lid to the salt block. This sensor is small enough to fit in the battery compartment of the water softener.
Amazing! I want to do this too. My water softener is sat outside in a box so I need it to be weather proof
Take a look at some of the other comments. People are using transducers to measure the distance from the top of the softener to the salt to determine how full it is. You could probably put a contraption like that into a waterproof housing
You might also be able to use the existing Aquacell integration in Home assistant to integrate Harvey softeners, although it is cloud dependant.
Hello brother I been watching your videos and learning so much about docker and home automation Thank you so much. I still have a lot to learn tho. I have a request for you, in one of your videos from about 2 years ago you ask your subscriber that if they have questions on a particular application you may make a video. I want to know if you are familiar with Zerotier software I currently run it on my Home Assistant OS and it works fabulous but I don't know how to install and configure as a docker container. My set up is a Mac mini 2012 running Ubuntu server latest version. The reason I do it this way its because I run Nextcloud on the same machine along with Docker. Thank you once again for the content you post we appreciate it very much. Cheers from California.
As accuracy is not critical here, a single load cell as one of 3 or 4 legs would also do here. That load cell will only get 1/3rd or 1/4th of the weight as the other legs will take the rest of it, but it would help further lower the BOM cost and might actually give less random noise than having to balance 4 sensors.
The whole reorder system was the reason I avoided Harvey, I used a ultrasonic sensor to detect the distance to work out how much was remaining. I wasn't sure if the water softener weight would change depending on water, so I opted for monitoring the distance.
It's a good idea!
I have set up a similar system of scales to weigh solvent tanks. They monitor rinse solvent to alert staff when its nearing empty and requires a refill. Otherwise its a guess due to no display on the tanks.
Excellent use case!
Thanks for the shoutout! However i dont deserve the credit, i totally stole the idea from some other project and adapted it to work on esphome.
Just a thought, but did you try reverse engineering the built in sensor on your salt softner? That would be a fun project in the future.
Thanks for this. Great video. During your research were you able to find a more precise solution even if it were more involved or expensive? I've used threshold based solutions like this, and it covers almost all of my needs. However, there are a few applications where precise and consistent values would be super useful! Anyone have any suggestions on where to start?
My research showed that if you buy more accurate load cells, then you get better results.
I really can't understand why people complain about soldering wires and simple stuff. It's a simple skill and low investment
It's a faff though
I wanna know more about this water softener you have. Do you like it? How well does it work? Have you done before/after water tests?
I love it. It works really well. I did water hardness tests before and after, but you don't really need them. The results are immediately obvious to the naked eye. No more calc build-up on the taps and shower. Glasses are cleaner. Dishwasher salt lasts way longer.
There are also other water softener out, which can run white out salt. My parents switched to them after a incident white salt based.
What kind of incident?
@@HomeAutomationGuy it exploded after some years and basement was little flooded. Luckily there was not bigger damage.
@@tobiasgugger-haslerrail5914 😱
Any issues with the M5 having to be rebooted every week or so? Have heard others complain about it as a BT proxy?
I plan on using this idea. Thanks.
I've had frustration using the Atom Lite as Bluetooth proxies. It frequently goes offline/unavailable until I reboot them. They still work otherwise.
Cool, I'd been wondering if I could add a sensor to do this for mine. 👍
I'm going to test your project, and I've already bought the kit. Could you share your ESPHome code? Thanks. 5:36
How heavy is your water softener or what type of flat surface do you use? I tried 2.5cm thick wooden sheet (similar to the one on your video), but it bends too much in the middle if the weight is above 50kg and pressed the whole board against the floor in the middle where the weight module is. Afterall, thinkness of that module is nearly the same as that of the legs that are supposed to measure the weight. Wonder how you solved that challenge?
It weighs about 30kg and the floor is made of tile. My wood board is about 2.5cm and it doesn't flex enough to touch the floor. There is enough clearance under it for the module in my setup. I've got about 3-5mm
@@HomeAutomationGuy Thank you, Alan. Unfortunately my water softener is a lot heavier - it weighs over 100kg. Just the salt bag alone weighs about 25kg. And that flexes the wood board substantially. I will try a 4 or 5cm thick board. Hopefully that will resolve the challenge. I just wish that weights module wouldn't have to be under the board. At least there would be less risk it crushing to pieces if the wood board flexes too much over time putting rest of the weight on it.
@@ehajiyev Other commenters have used distance measurers at the top of their softener to measure the salt levels - perhaps that would work for one your size?
@@HomeAutomationGuy Indeed, I have seen that. It seems fairly straightforward too. But not sure what else would I use the electronic scales for then. However, I might give it a try if the wood board option doesn't work out. Once again big thanks for your ideas and suggestions. Love your videos.
@@ehajiyev All the best with the project!
I did this years ago with mine. I ended up using load cells from a scale I took apart ha. Ended up getting water damaged though :(
Use proximity sensors or IR leds.
Geek chic! Thanks.
It would have been easyer if you use distance sensors. 2 of them above the salt brick would show the % value
Can it work with rasberry pi?
Not this specific kit, but definitely the concept.
@ is there a code for it?
@@pruthvigeedh1059 I do not know.
hm, maybe i can use something like this to check how full the water tank of my dehumidifier is...
Perfect!
I don't think using weight is a good idea,
I have one of this unit at home, and another type of failure this unit have is a internal pipe leak
which will cause the unit water lever to go way higher then it should
If that happened your weight senses will unable to detect any problem as the unit will be fill with water weight
I have this problem on myself when my unit is just less then a year old and need to call for repair
Oh, that's good to know! I hope mine lasts a little longer
I have been reverse engineering the Mobile App and am able to log in successfully login and pull the values from the cloud servers.
The next step is to make a custom_component for home assistant, but this wont be easy for me.
Try Claude by Anthropic
If it’s for the Harvey I’m very interested
@DTech101 Yes its the same app/process for Harvey, and their Reseller Brands e.g. MiniMax.
Hey @DTech101 ,
I have put together a custom component. Did you want to test it out for me?
HomeAssistant now shows a Device with the following entities.
Left Percent & Days Left
Right Percent & Days Left
Lid In Place
Battery %
Last Update DateTime
I’d love the under bed sensor but, I have cats…
You can adjust based on weight. Just create a threshold that's above your cat's weight. That way, they won't trigger.
It’s more to exclude their movement from an under bed sensor. I’ll figure something. That’s way down a very long list 😊
@@rorylong314 ah, sorry, I missed that part about UNDER the bed! 😅 😸
I use an Aqara motion sensor. I have placed this horizontally about 10 cm above my bed, about 40 cm to the side (mine is attached to a speaker). The motion sensor is facing upwards, mostly facing the wall. Only when I get up out of bed, it triggers the motion sensor.
Designing wifi devices in ESPhome is more tinkerer thing that functionality considering constant problems with this platform. Maybe one day someone will come out with platform without and HA influence - zigbee based without constant "improvements" and breaking changes.