Open ruslanruslanruslan opened 4 years ago
You need to create templates for each sensor. I will share mine shortly if nobody answers before.
@GreyEarl @Cheaterdev can someone help with creating graphs for every attribute like tVOC and CO2?
@khmyznikov
- platform: template
sensors:
home_co2:
friendly_name: "CO2"
value_template: "{{states.sensor.clear_grass.attributes.co2}}"
unit_of_measurement: ppm
icon_template: mdi:periodic-table-co2
home_tvoc:
friendly_name: "tVoc"
value_template: "{{states.sensor.clear_grass.attributes.tvoc}}"
unit_of_measurement: ppb
icon_template: mdi:air-filter
home_temperature:
friendly_name: "Temperature"
value_template: "{{states.sensor.clear_grass.attributes.temperature}}"
unit_of_measurement: '°C'
icon_template: mdi:temperature-celsius
home_humidity:
friendly_name: "Humidity"
value_template: "{{states.sensor.clear_grass.attributes.humidity}}"
unit_of_measurement: '%'
icon_template: mdi:water-percent
home_pm25:
friendly_name: "PM 2.5"
value_template: "{{states.sensor.clear_grass.state}}"
unit_of_measurement: 'mg'
icon_template: mdi:weight-gram
# Xiaomi Air Quality Monitor
sensor:
- platform: clear_grass
name: Xiaomi ClearGrass Air Detector
host: 192.168.1.35 # replace ip
token: 123456789 # replace token
- platform: template
sensors:
home_co2:
friendly_name: "CO2"
value_template: "{{states.sensor.xiaomi_cleargrass_air_detector.attributes.co2}}"
unit_of_measurement: ppm
icon_template: mdi:periodic-table-co2
home_tvoc:
friendly_name: "tVoc"
value_template: "{{states.sensor.xiaomi_cleargrass_air_detector.attributes.tvoc}}"
unit_of_measurement: ppb
icon_template: mdi:air-filter
home_temperature:
friendly_name: "Temperature"
value_template: "{{states.sensor.xiaomi_cleargrass_air_detector.attributes.temperature}}"
unit_of_measurement: '°C'
icon_template: mdi:temperature-celsius
home_humidity:
friendly_name: "Humidity"
value_template: "{{states.sensor.xiaomi_cleargrass_air_detector.attributes.humidity}}"
unit_of_measurement: '%'
icon_template: mdi:water-percent
home_pm25:
friendly_name: "PM 2.5"
value_template: "{{states.sensor.xiaomi_cleargrass_air_detector.state}}"
unit_of_measurement: 'mg'
icon_template: mdi:weight-gram
I have figured out, this is the correct one.
How to view history graph of every indicator? I see only AQI..