Help. how to get notification on full thousand digits

hi. I have a bitcoin sensor in usd. Now I want a notification every time the price reaches thousands. example:

50000
51000
52000
53000
Etc.

Of course in both directions, whether up or down. simply whenever full thousands are reached. i dont want create an alarm with hundrets of if 50k, 51k, 52k,…180k. Just one notification on all full thousands are reached.

could someone help?

Create a Template sensor (under Helpers) with a state template of:

{{ states('sensor.YOUR_BTC_SENSOR')|float(0)//1000 }}

Then create an automation to send the notification when that sensor’s state changes.

// is the integer division operator:

https://jinja.palletsprojects.com/en/latest/templates/#math

thanks mate. works perfect.

1 Like