Skip to content

Instantly share code, notes, and snippets.

@ophilips
Last active December 18, 2018 08:53
Show Gist options
  • Save ophilips/bfc11295d765dc85a4bd1412be480658 to your computer and use it in GitHub Desktop.
Save ophilips/bfc11295d765dc85a4bd1412be480658 to your computer and use it in GitHub Desktop.
Home Assistant Sensor; Airquality at measuring station "Kendlerstraße" in Vienna. Station can be changed to any that supports PM2.5 measurements.
# Airquality at measuring station "Kendlerstraße" in Vienna
sensor:
- platform: command_line
name: wien pm25
scan_interval: 3600
command: curl https://www.wien.gv.at/ma22-lgb/tb/tb-aktuell.htm | grep -oP "Kendler.+\|.+\|.+\|.+\|.+\|\s+\K\d{0,3}(?=.\|.+\|.+\|)"
value_template: '{{ value | int }}'
unit_of_measurement: 'µg/m³'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment