Greetings,
I am trying to access the state instead of an attribute of an entity. In my case it is a light. I want to curl and send a get request to grab the information of the state and store it as a JSON file. I have tried to the get request for the light correct, but I get a error 404. Again not sure if my resource link is messed up or etc .I have the api enabled and I am trying to use REST api. Below is config.yaml excerpt and a screenshot of the listed entity.
sensor:
- platform: template
sensors:
light.big_room:
friendly_name: 'Big Room'
entity_id:
- light.big_room
value_template: "{{ is.state('sensor.light.big_room.state', 'on')}}"
- platform: rest
sensors:
light.big_room:
resource: /api/states/sensor/light.big_room
name: Big Room
value_template: "{{ state.state('light.big_room') }}"