Skip to content

Commit 5cb350c

Browse files
authored
Merge pull request #141 from MallocArray/request_headers
Rename http headers to request_headers for 2025.5.0
2 parents 9d7ef38 + ce5041b commit 5cb350c

7 files changed

+14
-14
lines changed

packages/airgradient_api_d1_mini.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interval:
1111
# AirGradient URL with the last 6 of MAC address all lower case
1212
url: !lambda |-
1313
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
14-
headers:
14+
request_headers:
1515
Content-Type: application/json
1616
json:
1717
wifi: !lambda return to_string(id(wifi_dbm).state);
@@ -49,7 +49,7 @@ esphome:
4949
# Using -50 instead of actual value as the wifi_signal sensor has not reported a value at this point in boot process
5050
url: !lambda |-
5151
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
52-
headers:
52+
request_headers:
5353
Content-Type: application/json
5454
json:
5555
wifi: !lambda return to_string(-50);

packages/airgradient_api_d1_mini_insecure.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interval:
1111
# AirGradient URL with the last 6 of MAC address all lower case
1212
url: !lambda |-
1313
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
14-
headers:
14+
request_headers:
1515
Content-Type: application/json
1616
json:
1717
wifi: !lambda return to_string(id(wifi_dbm).state);
@@ -49,7 +49,7 @@ esphome:
4949
# Using -50 instead of actual value as the wifi_signal sensor has not reported a value at this point in boot process
5050
url: !lambda |-
5151
return "http://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
52-
headers:
52+
request_headers:
5353
Content-Type: application/json
5454
json:
5555
wifi: !lambda return to_string(-50);

packages/airgradient_api_d1_mini_no_sgp41.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interval:
1111
# AirGradient URL with the last 6 of MAC address all lower case
1212
url: !lambda |-
1313
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
14-
headers:
14+
request_headers:
1515
Content-Type: application/json
1616
json:
1717
wifi: !lambda return to_string(id(wifi_dbm).state);
@@ -47,7 +47,7 @@ esphome:
4747
# Using -50 instead of actual value as the wifi_signal sensor has not reported a value at this point in boot process
4848
url: !lambda |-
4949
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address().substr(6,11) + "/measures";
50-
headers:
50+
request_headers:
5151
Content-Type: application/json
5252
json:
5353
wifi: !lambda return to_string(-50);

packages/airgradient_api_esp32-c3.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interval:
1111
# AirGradient URL with the MAC address all lower case
1212
url: !lambda |-
1313
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
14-
headers:
14+
request_headers:
1515
Content-Type: application/json
1616
json:
1717
wifi: !lambda return to_string(id(wifi_dbm).state);
@@ -51,7 +51,7 @@ esphome:
5151
# Using -50 instead of actual value as the wifi_signal sensor has not reported a value at this point in boot process
5252
url: !lambda |-
5353
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
54-
headers:
54+
request_headers:
5555
Content-Type: application/json
5656
json:
5757
wifi: !lambda return to_string(-50);

packages/airgradient_api_esp32-c3_dual_pms5003t.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interval:
1212
# AirGradient URL with the MAC address all lower case
1313
url: !lambda |-
1414
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
15-
headers:
15+
request_headers:
1616
Content-Type: application/json
1717
# "!lambda return to_string(id(pm_2_5).state);" Converts sensor output from double to string
1818
# Method borrowed from ajfriesen
@@ -83,7 +83,7 @@ esphome:
8383
# Using -50 instead of actual value as the wifi_signal sensor has not reported a value at this point in boot process
8484
url: !lambda |-
8585
return "https://hw.airgradient.com/sensors/airgradient:" + get_mac_address() + "/measures";
86-
headers:
86+
request_headers:
8787
Content-Type: application/json
8888
json:
8989
wifi: !lambda return to_string(-50);

packages/airgradient_esp32-c3_board-arduino.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 5.1.0
2+
config_version: 5.2.0
33

44
esphome:
55
name: "${name}"
@@ -9,7 +9,7 @@ esphome:
99
project:
1010
name: mallocarray.airgradient
1111
version: "$config_version"
12-
min_version: 2024.6.0
12+
min_version: 2025.5.0
1313

1414
esp32:
1515
board: esp32-c3-devkitm-1

packages/airgradient_esp32-c3_board.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
substitutions:
2-
config_version: 5.1.0
2+
config_version: 5.2.0
33

44
esphome:
55
name: "${name}"
@@ -9,7 +9,7 @@ esphome:
99
project:
1010
name: mallocarray.airgradient
1111
version: "$config_version"
12-
min_version: 2025.2.0
12+
min_version: 2025.5.0
1313

1414
esp32:
1515
board: esp32-c3-devkitm-1

0 commit comments

Comments
 (0)