Hi All,
I have a simple automation that has me scratching my head and hoping that someone else more experienced can help. I have the following automation:
> ## Outside temperature indicator ##
> - alias: 'Hot Outside'
> trigger:
> platform: state
> entity_id: sensor.weather_apparent_temperature
> condition:
> condition: numeric_state
> entity_id: sensor.weather_apparent_temperature
> above: 85.0
> action:
> service: scene.turn_on
> entity_id: scene.hot_out
> - alias: 'Nice Outside'
> trigger:
> platform: state
> entity_id: sensor.weather_apparent_temperature
> condition:
> - condition: numeric_state
> entity_id: sensor.weather_apparent_temperature
> above: 72.0
> - condition: numeric_state
> entity_id: sensor.weather_apparent_temperature
> below: 86.0
> action:
> service: scene.turn_on
> entity_id: scene.nice_out
> - alias: 'Cool Outside'
> trigger:
> platform: state
> entity_id: sensor.weather_apparent_temperature
> condition:
> condition: numeric_state
> entity_id: sensor.weather_apparent_temperature
> below: 73.0
> action:
> service: scene.turn_on
> entity_id: scene.cool_out
It basically sets some lights using based on temperature. Each temperature range lights a different light: Blue < 73.0, Green > 72.0 and <86.0, Red > 85.0
I’ve noticed that when the temperature is 72.0F, no lights are set when, according to the logic, the blue light should be on. The temperature sensor I am using is forecast.io which appears to report temperature in single decimal places. I’m new to Python and I’m guessing this must be some sort of integer/float thing in Python that I don’t understand? What is the proper way to fix this?
Thanks.