I just played around with your plugin and tried to add a presence sensor without the "type": "motion" property (works fine with it) and got the following error:
/usr/lib/node_modules/homebridge-fritz-platform/src/accessory.js:2266
const totallength = accessory.context.fakegatoService.history.length - 1;
^
TypeError: Cannot read property 'history' of undefined
at Fritz_Box.getMotionLastActivation (/usr/lib/node_modules/homebridge-fritz-platform/src/accessory.js:2266:59)
at Fritz_Box.getService (/usr/lib/node_modules/homebridge-fritz-platform/src/accessory.js:683:63)
at new Fritz_Box (/usr/lib/node_modules/homebridge-fritz-platform/src/accessory.js:66:85)
at FritzPlatform.configureAccessory (/usr/lib/node_modules/homebridge-fritz-platform/src/platform.js:501:7)
at Timeout._onTimeout (/usr/lib/node_modules/homebridge-fritz-platform/src/platform.js:503:34)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
You might want to add a check before accessing the fakegatoService property (which is not available for occupancy sensors I guess).
Hi there,
I just played around with your plugin and tried to add a presence sensor without the
"type": "motion"
property (works fine with it) and got the following error:You might want to add a check before accessing the
fakegatoService
property (which is not available for occupancy sensors I guess).Best regards