UNPKG

@kala4ek/homebridge-starline

Version:
21 lines (18 loc) 404 B
function init(hap, name) { const service = new hap.Service.TemperatureSensor(name); service .getCharacteristic(hap.Characteristic.CurrentTemperature) .setProps({ minValue: -50 }); return service; } function update(state, service, obj) { service .getCharacteristic(obj.hap.Characteristic.CurrentTemperature) .updateValue(state); } module.exports = { init, update }