Created
May 24, 2024 18:03
-
-
Save cassidyjames/3c3b6fca7138b4836eeb468fa64a25a2 to your computer and use it in GitHub Desktop.
US EPA PM2.5 AQI card with multiple sensors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type: custom:mini-graph-card | |
| name: Kids Room | |
| entities: | |
| - entity: sensor.kids_room_pm2_5 | |
| - entity: sensor.kids_room_starkvind_pm2_5 | |
| show_fill: false | |
| - entity: sensor.kids_room_vindstyrka_pm2_5 | |
| show_fill: false | |
| animate: true | |
| decimals: 0 | |
| unit: PM2.5 | |
| hours_to_show: 12 | |
| more_info: false | |
| points_per_hour: 2 | |
| show: | |
| average: false | |
| extrema: false | |
| fill: fade | |
| icon_adaptive_color: true | |
| labels: false | |
| labels_secondary: false | |
| legend: false | |
| points: false | |
| color_thresholds: | |
| - value: 225.5 | |
| color: '#b5835a' | |
| - value: 175.45 | |
| color: '#9141ac' | |
| - value: 90.45 | |
| color: '#ed333b' | |
| - value: 45.45 | |
| color: '#ff7800' | |
| - value: 22.25 | |
| color: '#f8e45c' | |
| - value: 4.5 | |
| color: '#33d17a' | |
| card_mod: | |
| style: | | |
| ha-card { | |
| {% if states('sensor.kids_room_pm2_5') | float <= 9.0 %} | |
| --ha-card-background: #33d17a44; | |
| {% elif states('sensor.kids_room_pm2_5') | float <= 35.4 %} | |
| --ha-card-background: #f8e45c44; | |
| {% elif states('sensor.kids_room_pm2_5') | float <= 55.4 %} | |
| --ha-card-background: #ff780044; | |
| {% elif states('sensor.kids_room_pm2_5') | float <= 125.4 %} | |
| --ha-card-background: #ed333b44; | |
| {% elif states('sensor.kids_room_pm2_5') | float <= 225.4 %} | |
| --ha-card-background: #9141ac44; | |
| {% else %} | |
| --ha-card-background: #b5835a44; | |
| {% endif %} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment