Skip to content

Commit

Permalink
(fix) also leave standby when remote connects
Browse files Browse the repository at this point in the history
  • Loading branch information
splattner committed Sep 27, 2023
1 parent 5786031 commit 11b6e1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/client/deconzclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions pkg/integration/websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 11b6e1e

Please sign in to comment.