#Hello! Im trying to make a template that
1 messages · Page 1 of 1 (latest)
this is what i have come up with so far
sensor:
- platform: template
name: "Bed Occupancy"
unit_of_measurement: "people"
lambda: |-
if (id(sensor.bedsensor_hx711_value).state < 150) {
return 0; // No one on the bed
} else if (id(sensor.bedsensor_hx711_value).state < 200) {
return 1; // One person on the bed
} else {
return 2; // Two or more people on the bed
}