Immediately trigger template action

I’ve embedded a discreet scale under one of the tiles in the master bathroom and because I’ve not included a display, I have the speakers in the bathroom announce the weight. The problem is I cannot find a quick enough trigger.

If I simply use the state of the scale, if the previous weight and the new weight are the same (very common), the state technically has not changed so it will not announce.

And if I use a template sensor like the below, the now() causes the trigger to only fire off once per minute. As a scale needs to stabilise, I am left playing the statues game, not knowing if the weight is still stabilising or if it is just the delay from the template.

{{ (now() - states.sensor.master_bathroom_stabilized_mass.last_changed) >=0.01 }}

Does anyone have any ideas how I can have an immediate reaction to the state change, even if the value is identical?

Hi Nanganator,

Add a button on the wall to check the scale. Step on it, let it settle, push the button.

1 Like

Living up to the namesake! :smiley: WAF is too low on that approach. Also you’re unable to visually observe when it is settled so are guessing when to press a button and are likely to unsettle it again stretching out to touch the nearest wall.

Voice

what integration are you using, what’s creating the sensor?

1 Like

It’s made using the control board out of an old Xiaomi smart scale. The weight is sent via BLE with the standard Xiaomi BLE integration.

Integrate it via esphome instead and change the scale values to an event.

I had absolutely no idea that existed!! Thanks I’ll take a look!

It takes a bit more, and you need a free esp board, but you can do whatever you dream up

Ohh I’ve got a load of esp based devices already. Just had no clue esphome supported the Miscale BLE devices. Allows a lot more customization than the native integration.