mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-27 21:20:03 +00:00
Fix coverage
This commit is contained in:
@@ -2004,9 +2004,9 @@ class HomeAssistant extends Extension {
|
||||
* Whenever a device publish an {action: *} we discover an MQTT device trigger sensor
|
||||
* and republish it to zigbee2mqtt/my_devic/action
|
||||
*/
|
||||
const keys = ['action', 'click'].filter((k) => data.payload[k] && data.payload[k] !== '');
|
||||
for (const key of keys) {
|
||||
if (data.entity.definition) {
|
||||
if (data.entity.definition) {
|
||||
const keys = ['action', 'click'].filter((k) => data.payload[k] && data.payload[k] !== '');
|
||||
for (const key of keys) {
|
||||
const device = data.entity.device;
|
||||
if (!this.discoveredTriggers[device.ieeeAddr]) {
|
||||
this.discoveredTriggers[device.ieeeAddr] = new Set();
|
||||
|
||||
Reference in New Issue
Block a user