Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103042

How to multiply a numeric state by an input number

$
0
0

I’m using the Smart Irrigation integration to automate my yard irrigation. The integration uses weather data to calculate the amount of time to run each irrigation zone. I want to add an adjustment to the automation so that I can set the watering duration to be anywhere from 0-200% of the calculated time. I’m using an input number to set the percentage adjustment.

So, the integration will run each zone based on the state sensor.smart_irrigation_zone15_hourly_adjusted_run_time.

My adjustment entity is input_number.irrigation_duration_adjustment. It has an input range of 0-200. So I need to create a separate entity that is essentially sensor.smart_irrigation_zone15_hourly_adjusted_run_time * (input_number.irrigation_duration_adjustment/100) = New irrigation run time.

Can this be done?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 103042

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>