Skip to content

Commit

Permalink
Allow "no buttons" for Fritz!Dect 440 if temperature or humidity sens…
Browse files Browse the repository at this point in the history
…or is enabled
  • Loading branch information
Marcel Schmidt committed Feb 6, 2022
1 parent 035d3d4 commit 02f185d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/accessories/smarthome/smarthome-button.handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class Handler {
const buttons = accessory.context.config.buttons;

switch (buttons) {
case false:
break;
case 1:
try {
let device = this.smarthomeList.devices.find((device) => device.ain.includes(accessory.context.config.ain));
Expand Down
2 changes: 1 addition & 1 deletion src/accessories/smarthome/smarthome.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Setup = (devices, smarthomeConfig) => {
device.name
);
error = true;
} else if (device.accType === 'button' && !device.buttons) {
} else if (device.accType === 'button' && !device.buttons && !device.temperature && !device.humidity) {
logger.warn(
'There is no or no valid "buttons" configured for this SMARTHOME device. This device will be skipped.',
device.name
Expand Down

0 comments on commit 02f185d

Please sign in to comment.