Closed droans closed 1 year ago
Just to provide more information, I have found that changing to a dict instead of a list works. However, only a single rest call will be possible as you cannot use a list and it will fail to validate if you use rest:
in separate packages.
rest:
scan_interval: 3600
resource: https://www.gasbuddy.com/graphql
method: POST
headers:
Content-Type: application/json
payload: |
{
"operationName": "LocationBySearchTerm",
"variables": {
"fuel": 1,
"maxAge": 0,
"search": "46038"
},
"query": "query LocationBySearchTerm($search: String) { locationBySearchTerm(search: $search) { trends { areaName country today todayLow } } }" }
sensor:
- unique_id: gasbuddy_lowest_gas_price
name: Gasbuddy Lowest Gas Price
icon: mdi:gas-station
unit_of_measurement: USD
value_template: "{{ value_json.data.locationBySearchTerm.trends.0.todayLow | float }}"
- unique_id: gasbuddy_average_gas_price
name: Gasbuddy Average Gas Price
icon: mdi:gas-station
unit_of_measurement: USD
value_template: "{{ value_json.data.locationBySearchTerm.trends.0.today | float }}"
Home Assistant now raises an invalid config error:
Component rest cannot be merged. Expected a dict.
Appears to have been broken with PR #81723.All my
rest:
integration entities show this issue whilerest_command
and anything using theplatform: rest
are fine. My configurations appear to match the requirements based in the documentation. While I do not know HA code that well, I believe it is coming from the change here.Example Configuration:
Edit: somehow posted in the wrong repo. Sorry - marking closed.