Hi everyone
I am battling to get a rest switch working that has a different endpoint for the status as from the command itself. I have tried various formats etc without any luck. I would really appreciate any guidance.
Here are the details of the endpoints:
https://geyserwiseonline.com/AutomationService/api/unit/GetUnitStatus?apiKey=xxxxxxx=&unitid=abc
This returns a number of attributes/properties. The one I am interested in is “Element” which should update the status of the “switch”
{
"Element": "off",
"Temperature": "45",
"Exception": "",
"TimeLogged": "2021-06-17 22:03",
"CollectorTemperature": "43",
"HolidayMode": "off",
"TestPump": "off",
"AntiFreeze": "6",
"Solar": "7",
The endpoint for the command to change the status of the “switch” is:
Where changing the “Uniton” to true or false switches on or off.
I think that part of the problem is that the “Element” attribute is not a true boolean in that it can return a status of “on”, “off” or “standby”. “standby” means that it is currently not heating even though it is meant to be “on” as the temperature is already correct.
In effect “standby” should actually show as “off” on the “switch” status.
I have tried a bunch of variations around this:
- platform: rest
name: Geyserwise Element
resource: https://geyserwiseonline.com/AutomationService/api/unit/SetElement?apiKey=JZh5lmee11Z8oG7SsdhaNXPjaJFghX4CrWZLqJf5sc&unitid=2985
state_resource: https://geyserwiseonline.com/AutomationService/api/unit/GetUnitStatus?apiKey=JZh5lmee11Z8oG7SsdhaNXPjaJFghX4CrWZLqJf5sc&unitid=2985
body_on: 'Uniton=true'
body_off: 'Uniton=false'
headers:
Content-Type: application/x-www-form-urlencoded
I have actually lost the last bunch I tried due to a power failure causing a corruption of my HA instance and having to return to a backup from a few days prior.
Thank you for your guidance and assistance