待翻譯:Automate your home to keep your indoor air safe
AI 服務暫時不可用,以下為來源摘要,待恢復後補全翻譯:Recently, I woke up to my indoor air quality being surprisingly awful. I could see that it spiked around midnight while my family and I slept. Quickly I realized our ERV unit kicked on in the middle of the night and was…
AI 服務暫時不可用,以下為來源正文,待恢復後補全翻譯。
Recently, I woke up to my indoor air quality being surprisingly awful. I could see that it spiked around midnight while my family and I slept. Quickly I realized our ERV unit kicked on in the middle of the night and was pumping outside air filled with wildfire smoke into our house. Let’s solve this problem with Home Assistant automations and some commodity hardware. Hardware My HVAC system is a fairly new heat pump-based A/C & furnace combo. I like it for the most part, but the thermostat is typical proprietary garbage. For instance, the thermometer on the main outdoor unit is off by upwards of 20º because it gets hit with direct sunlight. It also fails to factor in outside humidity when calculating many of its automations. I also have an ERV unit to bring in outside air. If you’re not familiar with HRV/ERV units, they are air exchangers that act as “lungs” for your modern house. Newer houses are tightly sealed —which is great for energy conservation— and do not pull in fresh air as well as drafty old houses. This leads to stale air and CO2 build up. ERVs are particulary good in cold climates since you can bring in fresh air without opening your windows directly, flooding your home with sub-zero temperatures. Air quality is checked with my indoor and outdoor AirGradient sensors. These devices are fantastic (and highly recommended!), but if you want to save money you can get less precise air quality readings by using an open weather API. Lastly, I built a Corsi-Rosenthal Box to cheaply and quickly clean the indoor air when it gets bad. When I first heard about these, I dismissed them thinking they were some kind of viral nonsense that feels good but does nothing. I was very wrong. They work really well. Setup the automations We’ll create three automations: Toggle the ERV on or off depending on air quality outside Toggle the CR Box on or off depending on air quality inside Signal to the household the state of the air through a color-enabled light Automation #1: Toggling the ERV Originally I planned on allowing Home Assistant to control the ERV directly. This would let me do things like temporarily run the ERV on High so I could get the air in the house cycled quickly. Unfortunately, this ran into issues with the thermostat that came with my HVAC. My options were to either completely remove the ERV from the HVAC system and fully control it with Home Assistant or partially integrate it and have issues where it collides with the thermostat programming. None of these seemed appealing. I instead opted for something far simpler: kill the power if the air quality goes bad. These devices from IKEA are cheap and work well with Home Assistant and Zigbee. When the automation senses the µg/m³ is higher than healthy for more than 30 minutes, it simply switches off the ERV at the power source. ✍️A note on air quality units You’ll more often see air quality measured as AQI, especially when presented in mainstream media. This is a unit that represents air quality averaged over time, which is useful when thinking about air quality “for today”, but less useful when thinking about air quality “right now”. µg/m³ is the unit most sensors use to measure real-time air quality and I’ve moved all my automations to using it. When the air quality improves, the ERV power comes back on. Here’s the automation to turn off the ERV: alias: Turn off ERV on high PM2.5 triggers: - trigger: numeric_state entity_id: sensor.front_porch_airgradient_open_air_pm2_5 above: 35.4 for: minutes: 30 conditions: - condition: state entity_id: switch.furnace_room_erv_shutoff state: 'on' actions: - action: switch.turn_off target: entity_id: switch.furnace_room_erv_shutoff - action: notify.mobile_app_sebs_iphone metadata: {} data: message: >- ERV disabled — outdoor PM2.5 at {{ states('sensor.front_porch_airgradient_open_air_pm2_5') }} µg/m³ mode: single The inverted automation to turn it back on: alias: Turn on ERV when PM2.5 recovers triggers: - trigger: numeric_state entity_id: sensor.front_porch_airgradient_open_air_pm2_5 below: 25 for: minutes: 60 conditions: - condition: state entity_id: switch.furnace_room_erv_shutoff state: 'off' actions: - action: switch.turn_on target: entity_id: switch.furnace_room_erv_shutoff - action: notify.mobile_app_sebs_iphone metadata: {} data: message: >- ERV re-enabled — outdoor PM2.5 at {{ states('sensor.front_porch_airgradient_open_air_pm2_5') }} µg/m³ mode: single Automation #2: Toggling the CR Box Our second automation is essentially the same as our first, just inverted. Our CR Box stays off until needed, then turns on full blast when the indoor air quality drops. I keep my CR Box in the basement. It would be far better for me to keep it on the main floor to pull the upstairs and basement air more uniformly, but it’s far too big —and ugly— to leave out when it’s not in use. However, the results are still fantastic. In my 1800 sq ft house, if all my windows and doors are shut, I can clean out the air from top to bottom in about 35 minutes using the high setting. Our first automation is to turn the CR Box on: alias: Indoor Air Quality - Turn on CR Box to clear the air description: '' triggers: - trigger: air_quality.pm25_crossed_threshold target: entity_id: sensor.i_9psl_pm2_5 options: for: hours: 0 minutes: 30 seconds: 0 threshold: type: above value: active_choice: number number: 8 conditions: [] actions: - action: fan.turn_on metadata: {} target: entity_id: fan.workout_room_cr_box data: {} mode: single Then we turn it off when the quality returns: alias: Indoor Air Quality - Turn off CR Box when air is decent description: '' triggers: - trigger: air_quality.pm25_crossed_threshold target: entity_id: sensor.i_9psl_pm2_5 options: for: hours: 0 minutes: 15 seconds: 0 threshold: type: below value: active_choice: number number: 2 conditions: [] actions: - action: fan.turn_off metadata: {} target: entity_id: fan.workout_room_cr_box data: {} mode: single Automation #3: Show the air quality status as a specific color This is my favorite automation in this batch. I had a Phillips Hue Go light that I rarely used and decided to put it to good use. Installed in the kitchen, it has two modes: Normal light: If the switch is engaged, it acts as a normal light. Conditions signal: If the switch is off, it will display a color representing preciptiation OR air quality. The waterfall logic when the light is in signal mode is: Is the air quality bad? Show the color (orange, red, maroon) Is it going to rain today? Show blue before 10am None of the above? Turn off What I like about this configuration is that the light is only on when it has information that is useful. With no rain and no hazardous air quality, it’s simply off and not engaging you. This works wonders with actually capturing your attention when it needs it. ⚠️Phillips Hue are overpriced I spent a lot of money on Phillips brand products early in my automation journey and I deeply regret it. Not only are they very expensive, they are moving users towards requiring online accounts and away from the openness they started with. Here is the rather dense automation: alias: Portable light — Air Quality & Weather Signal description: >- Uses the Hue Go in Kitchen as a status lamp while switch.kitchen_boolean is OFF. The lamp is lit with a status color when air quality reaches "Sensitive Groups" or worse, or when rain is expected today; otherwise it turns off. Blue when rain is expected; PM2.5 band colors (µg/m³) for unhealthy-for- sensitive-groups air or worse — orange (> 35.4 µg/m³) and above outrank the rain signal. Moderate air (12.1–35.4 µg/m³) is ignored. When switch.kitchen_boolean is ON, this automation keeps its hands off entirely and the Hue Go behaves as a normal light. Turning the switch back OFF immediately restores the status color. triggers: - trigger: state entity_id: - sensor.front_porch_airgradient_open_air_pm2_5 - trigger: state entity_id: weather.forecast_home - trigger: homeassistant event: start - trigger: time_pattern minutes: /30 - trigger: state entity_id: switch.kitchen_boolean to: 'off' conditions: - condition: state entity_id: switch.kitchen_boolean state: 'off' actions: - variables: pm25: >- {{ states('sensor.front_porch_airgradient_open_air_pm2_5') | float(-1) }} - condition: template value_template: '{{ pm25 >= 0 }}' - action: weather.get_forecasts target: entity_id: weather.forecast_home data: type: daily response_variable: daily continue_on_error: true - variables: fc: >- {{ (daily | default({})).get('weather.forecast_home', {}).get('forecast', []) }} today: >- {% set d = now().strftime('%Y-%m-%d') %} {% set hits = fc | selectattr('datetime', 'search', d) | list %} {{ hits[0] if hits else (fc[0] if fc | count > 0 else {}) }} rain_today: |- {{ today.get('condition', '') in ['rainy', 'pouring', 'lightning-rainy', 'snowy', 'snowy-rainy', 'hail'] or (today.get('precipitation', 0) | float(0)) >= 0.04 }} rain_signal: '{{ rain_today and now().hour 35.4 or rain_signal }}' color: >- {% if pm25 > 225.4 %}[126, 0, 35]{# Hazardous — maroon #} {% elif pm25 > 125.4 %}[143, 63, 151]{# Very unhealthy — purple #} {% elif pm25 > 55.4 %}[255, 0, 0]{# Unhealthy — red #} {% elif pm25 > 35.4 %}[255, 126, 0]{# Sensitive groups — orange #} {% else %}[0, 110, 255]{# Rain today — blue #} {% endif %} - if: - condition: template value_template: '{{ signal }}' then: - action: light.turn_on target: entity_id: light.portable_light data: rgb_color: '{{ color }}' brightness_pct: 25 transition: 3 else: - action: light.turn_off Putting it all together With these three automations, you get a complete hands off system that brings in fresh air as long as it is safe. Even if bad air gets inside, the system will run to clear it out. Below is the required hardware we used (fancy color enabled light excluded). If you want to dramatically lower the overall cost, you can: Use an air quality API instead of using hardware to determine outdoor air quality Use cheaper indoor PM2.5 sensors (IKEA has some really cheap ones) Name Desc Price AirGradient Open Air High quality sensor for outdoor conditions, including air quality, temperature and humidity. ~$250 AirGradient One High quality sensor for indoor conditions. ~$260 TRETAKT Smart Plug Old ones used Zigbee; newer ones might use Matter. Price is $20 each (we need 2 total). $~40 MERV-13 filter We need x4 for our CR Box. ~$25 each ~$100 Cheap box fan The workhorse of our CR Box ~$35 TOTAL $685 Join the newsletter New posts in your inbox. No noise, unsubscribe whenever.