mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-10-05 16:57:04 +08:00
Switch true/false conditionals to boolean
This commit is contained in:
@@ -82,7 +82,7 @@ export default class BinarySensor extends RingSocketDevice {
|
||||
}
|
||||
|
||||
publishState(data) {
|
||||
const isPublish = data === undefined ? true : false
|
||||
const isPublish = Boolean(data === undefined)
|
||||
const contactState = this.device.data.faulted ? 'ON' : 'OFF'
|
||||
this.mqttPublish(this.entity[this.entityName].state_topic, contactState)
|
||||
this.publishBypassModeState(isPublish)
|
||||
|
Reference in New Issue
Block a user