Thanks for this! Quick question about measuring R1. I measured on the strip with it not connected to the ESP32, and I get 2.1M Ohms, but it will slowly get less and less resistance as I measure (no pressure on the strip). So do I use the 2.1 as the value or the end value after a set time? Or do I measure when 3.3v is applied?
You measure the FSR resistance with nothing attached, wait for it to settle.
I’ve just found a reason for using input_numbers in home assistant instead.
ESPHome number components do not restore their state on restart of the esphome device.
I’ll be changing back to using input numbers.
I’ve wondered why I was having to reset the state. Are you going to update post 1? I’m good at copy/paste!
Thanks
Yeah, I just reverted the first post to the previous edit.
- restore_value (Optional, boolean): Saves and loads the state to RTC/Flash. Cannot be used with
lambda
. Defaults tofalse
.
Why isn’t that on the Number component page?
That’s where I looked for that exact setting. Either way I’m leaving it as an input number now.
By the looks of it only the template number
supports restore_value
and all other number platforms don’t (at this point). Probably that’s the reason why the documentation is found directly in the Template Number docs and not in Number component docs (because it’s not “universal” for that component).
I want to build it today, but I didnt understand how to connect the wires to esp32, I have resistors
I just need pic or something to show me how to wire
thank you
Could anyone help me in setting up a second strip for my partners side of the bed?
We have a superking bed and the bed sensor is working fantastic but what it’s highlighted is that I sleep on the same place and she moves around lol. It’s perfect when she’s on the right spot but not so good when she moves.
My plan is to add a third FSR but ideally I would create 2 ADC sensors and name then XXX1 and XXX2 but I would only want them to change the binary sensor if one or the other is lower than the threshold.
So basically
- platform: template
name: “XXX Bed Occupied”
id: “XXX_bed_occupied”
lambda: |-
if (id(XXX1_bed_sensor).state < id(XXX_trigger_level).state) {
OR XXX2 < Trigger State
return true;
} else {
return false;
}
I know how to setup the 2 sensors but I’m struggling with coding the OR. Ideally I’ll end up with a single binary sensor that can be switched by 2 FSR’s
Thank you all
Does somebody has a link on Aliexpress for buying these resistors ?
Thanks !
No, I mean the resistors (R1)
Buy them locally.
You can probably find a box full of all values fairly cheap.
We don’t have such a store nearby…
Anyway, I already have to order stuff at Aliexpress so.
A box with different values would indeed be great, but I’m a novice so I really don’t know what I should order…and that’s why I asked.
For a start these assorted kits are always useful.
Like some resistors:
https://www.aliexpress.com/item/32505894332.html
Some capacitors:
https://www.aliexpress.com/item/32954751214.html
Some diodes:
Hi r1 Value is described. What about r2? What would it be?
R2 is the FSR, the resistor that varies with weight.
ahahah ! doh!
Thanks