Last active
May 5, 2023 18:19
-
-
Save qguv/0a9b725f9f3ecde4da6df1420da36b75 to your computer and use it in GitHub Desktop.
get data from a sensor.community (airRohr) sensor into Home Assistant locally
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
rest: !include_dir_list rest/ |
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
############################################ | |
# # | |
# save this to /config/rest/airRohr.yaml # | |
# and replace SENSOR_IP below # | |
# # | |
############################################ | |
# get data from a sensor.community (airRohr) sensor into Home Assistant locally. | |
# | |
# unlike the official integration, these entities are not cloud dependent, so | |
# they will update even when the sensors cannot post data to the public APIs. | |
# | |
# if you have indoor sensors, you probably want to keep their data private. | |
# after adding the entities below, you can disable all API reporting by visiting: | |
# | |
# http://SENSOR_IP/config | |
# | |
# and un-checking all of the APIs in the APIs tab. | |
# | |
# source: https://gist.github.com/qguv/0a9b725f9f3ecde4da6df1420da36b75 | |
# airRohr firmware: https://github.com/opendata-stuttgart/sensors-software | |
resource: http://SENSOR_IP/data.json | |
scan_interval: 145 | |
sensor: | |
- name: airRohr_version | |
unique_id: 1da0939c-e7b7-42e3-a5c0-9af644f7148d | |
value_template: | | |
{{ value_json.software_version }} | |
- name: airRohr_age | |
unique_id: 00b11347-03ef-45e8-b263-00b67924b824 | |
value_template: | | |
{{ value_json.age }} | |
- name: airRohr_pm10 | |
unique_id: 2af29863-2a17-4ef9-b365-ba9c16acebfd | |
device_class: pm10 | |
unit_of_measurement: "µg/m³" | |
icon: mdi:smoke | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'SDS_P1') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_pm25 | |
unique_id: ea99d319-86f5-43ee-b159-21cdd346cc70 | |
device_class: pm25 | |
unit_of_measurement: "µg/m³" | |
icon: mdi:air-filter | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'SDS_P2') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_temperature | |
unique_id: aa855cbe-222b-4637-bddf-31660890589d | |
device_class: temperature | |
unit_of_measurement: "°C" | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'BME280_temperature') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_pressure | |
unique_id: 4424acc5-92bc-42ae-bfd4-a93f839a0b99 | |
device_class: pressure | |
unit_of_measurement: Pa | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'BME280_pressure') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_humidity | |
unique_id: f146065d-9e46-47f5-b02c-0f9fed45d13d | |
device_class: humidity | |
unit_of_measurement: "%" | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'BME280_humidity') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_samples | |
unique_id: 6fca79c0-a5a6-461c-a48d-e154238e2067 | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'samples') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_min_micro | |
unique_id: 09381e96-8e8d-43f4-95ee-ce25c9b6c9c9 | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'min_micro') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_max_micro | |
unique_id: a9a1cd97-36a6-4dd0-b5ba-b8c16c415331 | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'max_micro') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_interval | |
unique_id: 1da09cb9-e6fe-4395-83ac-9dc412bba74b | |
unit_of_measurement: s | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'interval') | first | default({'value': 'unavailable'})).value }} | |
- name: airRohr_signal | |
unique_id: 3576d40f-04a5-41fc-814a-042f6ad638e9 | |
device_class: signal_strength | |
unit_of_measurement: dBm | |
value_template: | | |
{{ (value_json.sensordatavalues | selectattr('value_type', 'equalto', 'signal') | first | default({'value': 'unavailable'})).value }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment