Advertisement
Ciccius

HA Sensore livello acqua tanica irrigatore

Oct 19th, 2022
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. - platform: template
  2. sensors:
  3. livello_tanica_irrigatore:
  4. friendly_name: "Livello tanica irrigatore"
  5. unit_of_measurement: '%'
  6. #icon_template: "hass:water-percent"
  7. icon_template: "hass:waves"
  8. value_template: >
  9. {% set level_params = {"min": 9, "max": 97 } %}
  10. {{ (100 - ((((float(states('sensor.ultrasonic_sensor'))*100)-level_params.min)*100) / (level_params.max - level_params.min))) | round(2) }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement