Hi.
I’m struggeling with setting a value when calling a service.
I have a temprature sensor that ranges from 20 to 70, I need to use that value to call a service. This part i get to work, the problem is that if the temprature sensor is greater that 50 to service that receives the value fail.
In my automation I pass
{{ states('sensor.nibe_76959_40071') }}
Is there a way to calculate the vaule, so that if it is greater than 50, I want to pass an actual vaule of 50.