diff --git a/docs/ReleaseNotes.md b/docs/ReleaseNotes.md index ce860c7..d49b524 100644 --- a/docs/ReleaseNotes.md +++ b/docs/ReleaseNotes.md @@ -5,6 +5,10 @@ # Homebridge MQTT-Thing: Release Notes +### Version 1.1.47 ++ Revert: Send service names to Homekit - causes issues by replacing user name changes ++ Send service names to Homekit now uses nameOverride configuration option + ### Version 1.1.46 + Added support for Carbon Monoxide Sensors (thanks, Nick Lange) + Added support for Fan version 2 (thanks, Ewan Dank) diff --git a/index.js b/index.js index 55f7254..6c18fd0 100644 --- a/index.js +++ b/index.js @@ -3485,10 +3485,10 @@ function makeThing( log, accessoryConfig, api ) { } else if( configType == "fanv2" ) { service = new Service.Fanv2(name, subtype); characteristic_Active(service); - if(config.getCurrentFanState){ + if(config.getCurrentFanState) { characteristic_CurrentFanState(service); } - if(config.topics.setTargetFanState || config.topics.getTargetFanState){ + if(config.topics.setTargetFanState || config.topics.getTargetFanState) { characteristic_TargetFanState(service); } if (config.topics.setLockPhysicalControls || config.topics.getLockPhysicalControls) { @@ -3520,6 +3520,11 @@ function makeThing( log, accessoryConfig, api ) { if( config.topics.getOnline ) { state_Online(); } + + // name override + if( config.nameOverride ) { + service.setCharacteristic( Characteristic.ConfiguredName, config.nameOverride ); + } } // always use services array diff --git a/package.json b/package.json index 47419c2..2d815e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "homebridge-mqttthing", - "version": "1.1.46", + "version": "1.1.47", "description": "Homebridge plugin supporting various services over MQTT", "main": "index.js", "scripts": {