Sorry if that seemed a bit of a daft or noob question. I’m still quite new to this and this is my first attempt at a rest sensor. I thought the file had to go in a certain location but then realized the sensor points to the file location.
I am running haos installed directly on a laptop using the x86 method. Not using windows or anything.
So I created a folder and pasted the file in the main directory using file editor. The path is shown in file editor as:
/homeassistant/roborock/roborock.json
I then added the sensor to configuration file in the sensors block like this:
- platform: rest
name: roborock_rooms
resource: http://192.xxx.xx.xxx:8123/homeassistant/roborock/roborock.json
value_template: "{{ now() }}"
json_attributes:
- rooms
Does the file path look correct? The sensor shows up in my entities but when I check the state in developer tools the attributes only shows the friendly name. I don’t see the list of rooms and is numbers
Again, appreciate any help you can give
Edit: I just noticed this error in logs
Logger: homeassistant.components.rest.util
Source: components/rest/util.py:37
Integration: RESTful (documentation, issues)
First occurred: 17:17:55 (25 occurrences)
Last logged: 17:29:51
REST result could not be parsed as JSON
This is the file
{
"rooms": [
{
"name": "kitchen",
"boolean": "input_boolean.vac_kitchen",
"id": "17"
},
{
"name": "dining_room",
"boolean": "input_boolean.vac_dining_room",
"id": "16"
},
{
"name": "foyer",
"boolean": "input_boolean.vac_foyer",
"id": "18"
},
{
"name": "laundry",
"boolean": "input_boolean.vac_laundry",
"id": "20"
},
{
"name": "living_room",
"boolean": "input_boolean.vac_living_room",
"id": "19"
},
{
"name": "master_bedroom",
"boolean": "input_boolean.vac_master_bedroom",
"id": "21"
},
{
"name": "master_bathroom",
"boolean": "input_boolean.vac_master_bathroom",
"id": "22"
},
{
"name": "guest_bathroom",
"boolean": "input_boolean.vac_guest_bathroom",
"id": "23"
}
]
}