steilerDev / homebridge-openhab2-complete

A homebridge plugin for openHAB, that has the expectation to fully support all Services offered by Apple's Homekit Accessory Protocol (HAP)
GNU General Public License v3.0
52 stars 16 forks source link

Bug report: LEVEL_CONFIG not defined in Level.js #82

Closed maisun closed 3 years ago

maisun commented 4 years ago

Hi,

I'd like to report an issue related to Filter Maintenance Sensor. Looks to me like the constant LEVEL_CONFIG is not defined in Level.js, and this cause the plugin not to load any filter sensors:

'use strict';

const {addNumericSensorActorCharacteristic} = require('./Numeric');

const LEVEL_CONFIG = { levelItem: "levelItem" };

function addCarbonDioxideLevelCharacteristic(service) { addNumericSensorActorCharacteristic.bind(this)(service, service.getCharacteristic(this.Characteristic.CarbonDioxideLevel), {item: LEVEL_CONFIG.levelItem} ); }

function addCarbonMonoxideLevelCharacteristic(service) { addNumericSensorActorCharacteristic.bind(this)(service, service.getCharacteristic(this.Characteristic.CarbonMonoxideLevel), {item: LEVEL_CONFIG.levelItem} ); }

function addFilterLifeLevelCharacteristic(service) { addNumericSensorActorCharacteristic.bind(this)(service, service.getCharacteristic(this.Characteristic.FilterLifeLevel), {item: LEVEL_CONFIG.levelItem} ); }

module.exports = { addCarbonDioxideLevelCharacteristic, addCarbonMonoxideLevelCharacteristic, addFilterLifeLevelCharacteristic };

steilerDev commented 3 years ago

Thank you! Added missing constant for next release.

eliempje commented 3 years ago

@steilerDev this is solved by https://github.com/steilerDev/homebridge-openhab2-complete/commit/c524cc20187981bd836361a9220a79e5cf6bc246 isn't it? Close this issue?

steilerDev commented 3 years ago

Fixed with 1.3.0