Unable to use "if and" in a thermostat automation