I’m trying to get a rest sensor to work but I get 401 Unauthorized and I don’t know what I’m doing wrong. I can post PUT commands to the same device via rest command with out any problems at all.
Configuration for the rest sensor:
sensor:
- platform: rest
name: litecom_heating
resource: "https://192.168.1.254/rest/v1/zones/4320c874-b2a1-4ef3-8d24-9efe3ef75697/services/scene"
method: GET
headers:
accept: 'application/json'
Autorization: !secret litecom
verify_ssl: false
Configuration for the rest command
varme_till:
url: "https://192.168.1.254/rest/v1/zones/4320c874-b2a1-4ef3-8d24-9efe3ef75697/services/scene"
method: PUT
headers:
accept: 'application/json'
Authorization: !secret litecom
content_type: 'application/json'
payload: '{ "activeScene": 0 }'
verify_ssl: false
From states: