I am trying to trigger an automation off of the following template value-templates:
“{{ is_state_attr(‘fan.fanlinc_51_d1_37_fan’, ‘percentage’, 100) }}”
“{{ is_state_attr(‘fan.fanlinc_51_d1_37_fan’, ‘percentage’, 66) }}”
“{{ is_state_attr(‘fan.fanlinc_51_d1_37_fan’, ‘percentage’, 67) }}”
“{{ is_state_attr(‘fan.fanlinc_51_d1_37_fan’, ‘percentage’, 33) }}”
These are, of course, four separate triggers which would be in four separate automations, corresponding to “fan on high” for the first, “fan on medium” for the second and third, and “fan on low” for the fourth.
The problem is that the automations never trigger, even though the if I put any one of these in the template editor in developer tools, I get appropriate true or false values. Can anyone suggest what I might be doing wrong?
A related, but ultimately moot question, unless I can make some progress, is how could I combine the second and third into a single value-template that would be true for either 67 or 66. This is the "fan on medium, which sometimes returns 66 and sometimes returns 67. Some way of doing an “or” or a “between” would be useful. I am sure this is the easier of the two questions, but it’s so closely related that I thought I would put it here.
Background information:
-
This percentage is a state attribute of an Insteon fanlinc fan entity, so this my problem may have something to do with the Insteon integration, but it seems more related to automations in general.
-
I’ve tried triggering on the device state and adding the value-template as a condition, but the condition seems to prevent the automation from triggering, so no joy there.
Any help appreciated. Thanks.