I am having problem configuring pilight. I want to configure my Etekcity outlets and control them through Home Assistant.
Pilight is working normally, I can turn on and off the outlet and pilight detects change of state even if I use the remote.
I also want to configure HA with pilight_switch…and I just cannot get the yaml config working. As ID pilight-receive gets the following output:
{
"message": {
"id": "A2",
"unit": 4,
"state": "on"
},
"origin": "receiver",
"protocol": "clarus_switch",
"uuid": "0000-b8-27-eb-7b7b97",
"repeats": 1
}
But if I enter A2
as ID in yaml there is an error, because int is expected. What is the right configuration?
Don’t know how to set “on” and “off” command as well since pilight-receive gets the same input for on and off only the state is reported as “off” when pressing the off button on the remote.
My yaml:
- platform: pilight
switches:
etekcity1:
on_code:
protocol: clarus_switch
unit: 4
# id: A2
'on': 1
off_code:
protocol: clarus_switch
unit: 4
# id: A2
'off': 1
@DavidLP answered a lot of questions in another topic which helped me get pilght running, unfortunately I am stuck now.
Any help would be greatly appreciated.