diff --git a/pkg/client/deconzclient.go b/pkg/client/deconzclient.go index 9ec7ab9..7c5cc7f 100644 --- a/pkg/client/deconzclient.go +++ b/pkg/client/deconzclient.go @@ -25,8 +25,6 @@ type DeconzClient struct { func NewDeconzClient(i *integration.Integration) *DeconzClient { client := DeconzClient{} - i.Config["ignoreEntitySubscription"] = true - client.IntegrationDriver = i // Start without a connection client.DeviceState = integration.DisconnectedDeviceState @@ -103,7 +101,7 @@ func (c *DeconzClient) handleSetDriverUserData(user_data map[string]string, conf log.Debug("Deconz handle set driver user data") - // confirm seens to be set to false always, maybe just the presence of the field tells be, + // confirm seems to be set to false always, maybe just the presence of the field tells me, // confirmation was sent? if len(user_data) == 0 { // Get a new Denon API Key @@ -203,6 +201,8 @@ func (c *DeconzClient) handleNewSensorDeviceDiscovered(device *deconz.DeconzDevi sensor = entities.NewSensorEntity(fmt.Sprintf("sensor%d", device.GetID()), entities.LanguageText{En: device.GetName()}, "", entities.HumiditySensorDeviceClass) } + // Currently no other sensors are implemeted + if sensor != nil { device.SetHandleChangeStateFunc(func(state *deconz.DeconzState) { diff --git a/pkg/integration/websocket.go b/pkg/integration/websocket.go index aa1b462..e09e2f1 100644 --- a/pkg/integration/websocket.go +++ b/pkg/integration/websocket.go @@ -40,6 +40,7 @@ func (i *Integration) wsEndpoint(w http.ResponseWriter, r *http.Request) { } log.WithField("RemoteAddr", ws.RemoteAddr().String()).Info("Unfolded Circle Remote connected") + i.Remote.ExitStandBy() // Start reading those messages go i.wsReader(ws)