We also like to have the windows open as much possible … but I never got around to building a dashboard card. I did however put together a notification automation that has worked well for my needs. I get notifications to open or close the windows based on on comparing a mix of forecasts, current outside temp and humidity to set points as well as inside conditions.
Like many houses here in the US we have central, forced-air heating and cooling, so it usually makes the most sense to open/close all the windows at the same time (this might not be directly translatable to other heating/cooling methods).
Notification Automation
Since the front porch sensor tends to warm up a bit sooner (and cools down a bit later) than the readings of the local weather station, I compare that to my indoor average.
alias: Alexa - Notify - Outside Temperature - Windows Actions
description: >-
Notifies when to open or close windows based on comparing outside temp and
humidity to setpoints as well as inside conditions.
trigger:
- platform: numeric_state
entity_id: sensor.front_porch_temperature
above: sensor.average_non_basement_temp
id: Hotter Outside
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- platform: numeric_state
entity_id: sensor.front_porch_temperature
below: sensor.average_non_basement_temp
id: Cooler Outside
for:
hours: 0
minutes: 5
seconds: 0
milliseconds: 0
- platform: state
entity_id: binary_sensor.nicer_outside
id: Nicer Outside
to: 'on'
for:
hours: 0
minutes: 5
seconds: 0
condition:
- condition: time
after: '07:30:00'
- condition: state
entity_id: input_boolean.a_in_bed
state: 'off'
- condition: state
entity_id: binary_sensor.house_occupied
state: 'on'
action:
- choose:
- conditions:
- condition: trigger
id: Hotter Outside
- condition: state
entity_id: binary_sensor.all_window_sensors
state: 'on'
- condition: numeric_state
entity_id: sensor.high_temp_forecast
above: '23.5'
sequence:
- wait_for_trigger:
- platform: numeric_state
entity_id: sensor.front_porch_temperature
above: '23.5'
for:
hours: 0
minutes: 10
seconds: 0
milliseconds: 0
timeout: '01:00:00'
- condition: numeric_state
entity_id: sensor.outside_temperature_derivative
above: '0'
- service: notify.alexa_media
data:
target: media_player.everywhere
data:
type: announce
message: "Its warming up outside. Time to close the windows."
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.all_window_sensors
from: 'on'
to: 'off'
timeout: '00:10:00'
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.all_window_sensors
state: 'off'
sequence:
- service: notify.alexa_media
data:
message: "Thank You. All the windows are now closed."
target: media_player.everywhere
data:
type: announce
default:
- condition: numeric_state
entity_id: sensor.outside_temperature_derivative
above: '0'
- service: notify.alexa_media
data:
message: "There are still windows open and its getting hotter outside."
target: media_player.everywhere
data:
type: announce
- conditions:
- condition: trigger
id: Cooler Outside
- condition: numeric_state
entity_id: sensor.outside_temperature_derivative
below: '0'
- condition: state
entity_id: binary_sensor.all_window_sensors
state: 'off'
- condition: numeric_state
entity_id: sensor.front_porch_temperature
above: '5'
below: '18'
- condition: numeric_state
entity_id: sensor.low_temp_forecast
above: '4.5'
sequence:
- service: notify.alexa_media
data:
target: media_player.everywhere
data:
type: announce
message: "Its cooling down outside. Time to open the windows."
- conditions:
- condition: trigger
id: Nicer Outside
- condition: state
entity_id: binary_sensor.all_window_sensors
state: 'off'
- condition: numeric_state
entity_id: sensor.front_porch_temperature
below: '23.5'
above: '4.5'
- condition: numeric_state
entity_id: sensor.low_temp_forecast
above: '4.5'
sequence:
- service: notify.alexa_media
data:
target: media_player.everywhere
data:
type: announce
message: >-
My sensors indicate that the combination of temperature and humidity may
be nicer outside than inside. This may be a good time to open the windows.
default: []
mode: single
The Nicer Outside sensor compares two template sensors that calculate the Discomfort Index. Alternatively, you could use a Heat Index or your preferred temp + humidity calculation.
I too made notifications and dashboard widgets. Per window I have binary sensors:
Window should be opened (windows in that room currently closed and no rain, hot and outside is 1 degree cooler or high CO2 or other pollutant levels inside)
Window should be closed (window currently open, rain or outside hot and temp outside 1 degree higher than inside, pollutant levels in the room ok)
When more binary sensors go on, and I’m at home and awake, the advice is broadcasted on my nest hub in the living room. I’m contemplating also broadcasting the advice for the room itself in that particular room when not asleep).
The dashboard has icons showing wether the window is closed (grey, closed window icon) or open (blue open window icon). When the advice is telling the window should be openend/closed, the icon turns red saying this is not the desired state.
I only see a solution for a card, unless one needs to stare at a screen to determine the moment to do so, with an automation suggested as an afterthought:
To me it seems like Drew’s answer is the real answer to the question.
Sorry, I’m not trying to be an ass: I followed the original link since I really wanted to see how some people are doing this. I clearly misunderstood the intent here and just explaining where I came from. I’m moving on.