From 127fe66500922f579fb4a3b30452e743539c860e Mon Sep 17 00:00:00 2001 From: jkerdreux-imt <jerome.kerdreux@imt-atlantique.fr> Date: Tue, 28 Jan 2025 01:37:48 +0100 Subject: [PATCH] Fix naming --- xaal.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xaal.go b/xaal.go index 0f1a8a8..df097ec 100644 --- a/xaal.go +++ b/xaal.go @@ -199,24 +199,24 @@ func (dev *PowerRelay) update(payload map[string]interface{}) { } } -func (dev *PowerRelay) SetState(value string) { +func (dev *PowerRelay) setState(value string) { state := dev.Expose.GetFeature("state") body := fmt.Sprintf(`{"%s": "%s"}`, state.Property, value) dev.Z2MDevice.Set(body) } func (dev *PowerRelay) turnOn(xaal.MessageBody) *xaal.MessageBody { - dev.SetState("ON") + dev.setState("ON") return nil } func (dev *PowerRelay) turnOff(xaal.MessageBody) *xaal.MessageBody { - dev.SetState("OFF") + dev.setState("OFF") return nil } func (dev *PowerRelay) toggle(xaal.MessageBody) *xaal.MessageBody { - dev.SetState("TOGGLE") + dev.setState("TOGGLE") return nil } -- GitLab