Created
November 12, 2022 09:38
-
-
Save RandomArray/06f9894e1a58767dd7c05a369a2506f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template: | |
- sensor: | |
- name: "Painting Weather Conditions" | |
state: > | |
{% set temp = states('sensor.lacrosse_tx141thbv2_0_144_t')|float %} | |
{% set humid = states('sensor.lacrosse_tx141thbv2_0_144_h')|float %} | |
{% if is_number(temp) and is_number(humid) and temp | float > 50 and temp | float < 90 and humid | float < 65 %} | |
Yes | |
{% elif temp | float <= 50 or temp | float >= 90 or humid | float >= 65 %} | |
No | |
{% else %} | |
Unknown | |
{% endif %} | |
icon: > | |
{% if is_state("sensor.painting_weather_conditions", "Yes") %} | |
mdi:spray | |
{% else %} | |
mdi:cancel | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment