Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
device.Events.on(SonosEvents.CurrentTransportStateSimple, state => {
publishState(device, state)
})
device.Events.on(SonosEvents.Mute, muted => {
publishMuted(device, muted)
})
device.Events.on(SonosEvents.Volume, volume => {
publishVolume(device, volume)
})
device.Events.on(SonosEvents.GroupName, groupName => {
publishData(`${config.name}/status/${cleanName(device.Name)}/group`, groupName, cleanName(device.Name), true)
})
device.Events.on(SonosEvents.Coordinator, coordinator => {
publishData(`${config.name}/status/${cleanName(device.Name)}/coordinator`, coordinator, cleanName(device.Name), true)
})
devices.push(device)
}