Thanks Greg, yes it’s always challenging trying to communicate this stuff to programmers when you are not a programmer yourself or familiar with the vernacular. so yes that’s helpful to know, although it does not get me much closer to my goal.
@guidagalattica are u still around and able to assist ?
- platform: rest
resource: https://api.pulsegrow.com/devices/19283/recent-data
method: GET
value_template: '{{ value_json["vpd"] | round(2) }}'
unique_id: pulseone_vpd
name: Pulse One VPD
unit_of_measurement: 'kPa'
scan_interval: 60
headers:
x-api-key: 8GZav6OAzm2lkkG8p8rDfnBB8hzn6u27SemF8yCLcTdq3
- platform: rest
resource: https://api.pulsegrow.com/devices/22235/recent-data
headers:
x-api-key: 8GZav6OAzm2lkkG8p8rDfnBB8hzn6u27SemF8yCLcTdq3
method: GET
scan_interval: 60
name: Pulse Zero Humidity
device_class: humidity
unique_id: pulsezero_humidity
value_template: '{{ value_json["humidityRh"] | round(1) }}'
unit_of_measurement: '%'
So above is the code I am currently running in my sensor.yaml file to return just one sensor value per each device.
When I try to pull multiple sensor values with one call using the given code below I get syntax errors. I tried creating the rest.yaml file too but no cigar. This is where I get stuck.
rest:
- resource: https://api.pulsegrow.com/devices/{{YOUR-DEVICE-ID}}/recent-data
headers:
x-api-key: {{YOUR-API-KEY}}
sensor:
- unique_id: pulsepro_vpd
name: "PulsePro VPD"
icon: mdi:cloud-refresh
unit_of_measurement: 'kPa'
value_template: '{{ value_json["vpd"] | round(2) }}'
- unique_id: pulsepro_temperature
name: "PulsePro Temperature"
device_class: temperature
unit_of_measurement: '°C'
value_template: '{{ value_json["temperatureC"] | round(2) }}'
- unique_id: pulsepro_humidity
name: "PulsePro Humidity"
device_class: humidity
unit_of_measurement: '%'
value_template: '{{ value_json["humidityRh"] | round(2) }}'
- unique_id: pulsepro_light
name: "PulsePro Light"
icon: mdi:wall-sconce-flat
unit_of_measurement: '%'
value_template: '{{ value_json["lightLux"] | round(2) }}'
- unique_id: pulsepro_pressure
name: "PulsePro Pressure"
device_class: pressure
unit_of_measurement: 'hPa'
value_template: '{{ (value_json["airPressure"] / 100) | round(1) }}'
- unique_id: pulsepro_co2
name: "PulsePro CO2"
device_class: carbon_dioxide
unit_of_measurement: 'ppm'
value_template: '{{ value_json["co2"] }}'
- unique_id: pulsepro_dew_point
name: "PulsePro Dew Point"
icon: mdi:thermometer-water
unit_of_measurement: '°C'
value_template: '{{ value_json["dpC"] }}'
- unique_id: pulsepro_signal_strength
name: "PulsePro Signal Strength"
device_class: signal_strength
unit_of_measurement: 'dB'
value_template: '{{ value_json["signalStrength"] }}'
binary_sensor:
- unique_id: pulsepro_pluggedin
name: "PulsePro Plugged In"
icon: mdi:power-plug
value_template: '{{ value_json["pluggedIn"] }}'