Hi,
Very new to homeassistant, a complete noob. I installed the dyson HACS plugin and was able to connect to the Dyson Big + Quiet BP04. I wanted to create something like @fahr created with AQI and all.
The entities it detected automatically are
Dyson Purifier Big+Quiet
fan.dyson_purifier_big_quietDyson Purifier Big+Quiet Carbon Dioxide
sensor.dyson_purifier_big_quiet_carbon_dioxideDyson Purifier Big+Quiet Carbon Filter Life
sensor.dyson_purifier_big_quiet_carbon_filter_lifeDyson Purifier Big+Quiet Continuous Monitoring
switch.dyson_purifier_big_quiet_continuous_monitoringDyson Purifier Big+Quiet HCHO
sensor.dyson_purifier_big_quiet_hchoDyson Purifier Big+Quiet HEPA Filter Life
sensor.dyson_purifier_big_quiet_hepa_filter_lifeDyson Purifier Big+Quiet Humidity
sensor.dyson_purifier_big_quiet_humidityDyson Purifier Big+Quiet Night Mode
switch.dyson_purifier_big_quiet_night_modeDyson Purifier Big+Quiet Nitrogen Dioxide Index
sensor.dyson_purifier_big_quiet_nitrogen_dioxide_indexDyson Purifier Big+Quiet PM 10
sensor.dyson_purifier_big_quiet_pm_10Dyson Purifier Big+Quiet PM 2.5
sensor.dyson_purifier_big_quiet_pm_2_5Dyson Purifier Big+Quiet Temperature
sensor.dyson_purifier_big_quiet_temperatureDyson Purifier Big+Quiet Volatile Organic Compounds Index
sensor.dyson_purifier_big_quiet_volatile_organic_compounds_index
It says on Aaron’s blog (Integrating the Dyson TP04 Air Purifier in Home Assistant - Automate The Things) to add this to configuration.yaml. How do I go about doing that? What variables in this would I need to change? Also need help with the custom card on the blog site.
Apologies if it’s too much hassle.
- platform: template
sensors:
dyson_calc_aqi:
friendly_name: "Dyson Calculated PM2.5 AQI"
unit_of_measurement: AQI
unique_id: dypson_tp_04_calc_aqi
# https://community.home-assistant.io/t/purpleair-air-quality-sensor/146588
value_template: >
{% macro calcAQI(Cp, Ih, Il, BPh, BPl) -%}
{{ (((Ih - Il)/(BPh - BPl)) * (Cp - BPl) + Il)|round }}
{%- endmacro %}
{% if (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 1000 %}
invalid
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 350.5 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 500.0, 401.0, 500.0, 350.5) }}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 250.5 %}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 250.5 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 400.0, 301.0, 350.4, 250.5) }}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 150.5 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 300.0, 201.0, 250.4, 150.5) }}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 55.5 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 200.0, 151.0, 150.4, 55.5) }}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 35.5 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 150.0, 101.0, 55.4, 35.5) }}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) > 12.1 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 100.0, 51.0, 35.4, 12.1) }}
{% elif (state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float) >= 0.0 %}
{{ calcAQI((state_attr("air_quality.master_bedroom", "particulate_matter_2_5")|float), 50.0, 0.0, 12.0, 0.0) }}
{% else %}
invalid
{% endif %}