diff --git a/automation/automation.go b/automation/automation.go index 58357a3..d6d3d9c 100644 --- a/automation/automation.go +++ b/automation/automation.go @@ -37,7 +37,7 @@ func on[M any](client paho.Client, topic string, onMessage func(message M)) { func RegisterAutomations(client paho.Client, prefix string, hue *hue.Hue, notify *ntfy.Notify, home *home.Home) { presenceAutomation(client, hue, notify, home) - mixerAutomation(client, home) + mixerAutomation(client, prefix, home) kettleAutomation(client, prefix, home) darknessAutomation(client, hue) } diff --git a/automation/mixer.go b/automation/mixer.go index 156d64f..4844d3e 100644 --- a/automation/mixer.go +++ b/automation/mixer.go @@ -4,13 +4,14 @@ import ( "automation/device" "automation/home" "automation/integration/zigbee" + "fmt" "log" paho "github.com/eclipse/paho.mqtt.golang" ) -func mixerAutomation(client paho.Client, home *home.Home) { - on(client, "test/remote", func(message zigbee.RemoteState) { +func mixerAutomation(client paho.Client, prefix string, home *home.Home) { + on(client, fmt.Sprintf("%s/living/remote"), func(message zigbee.RemoteState) { mixer, err := device.GetDevice[device.OnOff](&home.Devices, "living_room/mixer") if err != nil { log.Println(err)