async publishPolledState(isPublish) {
        if (this.device.hasLight) {
            const lightState = this.device.data.led_status === 'on' ? 'ON' : 'OFF'
            if (lightState !== this.data.lightState || isPublish) {
                this.data.lightState = lightState
                this.publishMqtt(this.entity.light.state_topic, this.data.lightState, true)
            }
        }
        if (this.device.hasSiren) {
            const sirenState = this.device.data.siren_status.seconds_remaining > 0 ? 'ON' : 'OFF'
            if (sirenState !== this.data.sirenState || isPublish) {
                this.data.sirenState = sirenState
                this.publishMqtt(this.entity.siren.state_topic, this.data.sirenState, true)
            }
        }

        if (this.device.data.settings.motion_detection_enabled !== this.data.motionDetectionEnabled || isPublish) {
            this.publishMotionAttributes()
        }
    }
// when values change from previous polling interval
when values change from previous polling interval
when values change from previous polling interval
async publishPolledState(isPublish) {
        if (this.device.hasLight) {
            const lightState = this.device.data.led_status === 'on' ? 'ON' : 'OFF'
            if (lightState !== this.data.lightState || isPublish) {
                this.data.lightState = lightState
                this.publishMqtt(this.entity.light.state_topic, this.data.lightState, true)
            }
        }
        if (this.device.hasSiren) {
            const sirenState = this.device.data.siren_status.seconds_remaining > 0 ? 'ON' : 'OFF'
            if (sirenState !== this.data.sirenState || isPublish) {
                this.data.sirenState = sirenState
                this.publishMqtt(this.entity.siren.state_topic, this.data.sirenState, true)
            }
        }
        if (this.device.data.settings.motion_detection_enabled !== this.data.motionDetectionEnabled || isPublish) {
            this.publishMotionAttributes()
        }
    }
async publishPolledState ( isPublish ) { if ( this . device . hasLight ) { const lightState = this . device . data . led_status === 'on' ? 'ON' : 'OFF' if ( lightState !== this . data . lightState || isPublish ) { this . data . lightState = lightState this . publishMqtt ( this . entity . light . state_topic , this . data . lightState , true ) } } if ( this . device . hasSiren ) { const sirenState = this . device . data . siren_status . seconds_remaining > 0 ? 'ON' : 'OFF' if ( sirenState !== this . data . sirenState || isPublish ) { this . data . sirenState = sirenState this . publishMqtt ( this . entity . siren . state_topic , this . data . sirenState , true ) } } if ( this . device . data . settings . motion_detection_enabled !== this . data . motionDetectionEnabled || isPublish ) { this . publishMotionAttributes ( ) } }
when values change from previous polling interval
when values change from previous polling interval