Skip to content

Instantly share code, notes, and snippets.

@oquno
Last active February 8, 2023 03:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oquno/c16c03b1ccd7251d7725b85a92a14246 to your computer and use it in GitHub Desktop.
Save oquno/c16c03b1ccd7251d7725b85a92a14246 to your computer and use it in GitHub Desktop.
https://gist.github.com/oquno/d07f6dbf8cc760f2534d9914efe79801 の JSON を Home Assistant に取り込む config
resource: http://RASPI/sensor.json
method: GET
scan_interval: 30
sensor:
- name: UD CO2
unique_id: ud1_co2
value_template: "{{ value_json.stat.co2ppm }}"
unit_of_measurement: "ppm"
state_class: measurement
device_class: carbon_dioxide
- name: UD Humidity
unique_id: ud1_humidity
value_template: "{{ value_json.stat.humidity }}"
unit_of_measurement: "%"
state_class: measurement
device_class: humidity
- name: UD Temperature
unique_id: ud1_temperature
value_template: "{{ value_json.stat.temperature }}"
unit_of_measurement: "℃"
state_class: measurement
device_class: temperature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment