Skip to content

Commit

Permalink
(fix) DenonAVR move set connected state call
Browse files Browse the repository at this point in the history
  • Loading branch information
splattner committed Sep 28, 2023
1 parent 9578297 commit ad3effc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/client/denonavrclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func NewDenonAVRClient(i *integration.Integration) *DenonAVRClient {

func (c *DenonAVRClient) initDenonAVRClient() {

log.Debug("Initialize DenonAVR CLient")

// Media Player
c.mediaPlayer = entities.NewMediaPlayerEntity("mediaplayer", entities.LanguageText{En: "Denon AVR"}, "", entities.ReceiverMediaPlayerDeviceClass)
c.mediaPlayer.AddFeature(entities.OnOffMediaPlayerEntityFeatures)
Expand Down Expand Up @@ -316,11 +318,11 @@ func (c *DenonAVRClient) denonClientLoop() {
log.WithFields(log.Fields{
"Denon IP": c.denon.Host}).Info("Start Denon AVR Client Loop")
go c.denon.StartListenLoop()
}

// Handle connection to device this integration shall control
// Set Device state to connected when connection is established
c.setDeviceState(integration.ConnectedDeviceState)
// Handle connection to device this integration shall control
// Set Device state to connected when connection is established
c.setDeviceState(integration.ConnectedDeviceState)
}

// Run Client Loop to handle entity changes from device
for {
Expand Down

0 comments on commit ad3effc

Please sign in to comment.