@@ -47,21 +47,24 @@ export class TempStickAccessory {
4747 // Example: add two "motion sensor" services to the accessory
4848 const ambientTemperatureService = this . accessory . getService ( 'Ambient Temperature Sensor' ) ||
4949 this . accessory . addService ( this . platform . Service . TemperatureSensor , 'Ambient Temperature Sensor' , 'AmbientTemperatureSensor' ) ;
50+ ambientTemperatureService . setCharacteristic ( this . platform . Characteristic . Name , accessory . displayName + ' Ambient Temp Sensor' ) ;
51+
5052
5153 // undocumented in V1 API, TODO: test if this exists without a probe
5254 const probe = ! ! accessory . context . device . last_tcTemp ;
5355 let probeTemperatureService : Service | undefined = undefined ;
5456 if ( probe ) {
5557 probeTemperatureService = this . accessory . getService ( 'Probe Temperature Sensor' ) ||
5658 this . accessory . addService ( this . platform . Service . TemperatureSensor , 'Probe Temperature Sensor' , 'ProbeTemperatureSensor' ) ;
59+ probeTemperatureService . setCharacteristic ( this . platform . Characteristic . Name , accessory . displayName + ' Probe Temp Sensor' ) ;
5760 }
5861
5962 this . service = this . accessory . getService ( this . platform . Service . HumiditySensor )
6063 || this . accessory . addService ( this . platform . Service . HumiditySensor ) ;
6164
6265 // set the service name, this is what is displayed as the default name on the Home app
6366 // in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
64- this . service . setCharacteristic ( this . platform . Characteristic . Name , accessory . displayName ) ;
67+ this . service . setCharacteristic ( this . platform . Characteristic . Name , accessory . displayName + ' Humidity Sensor' ) ;
6568
6669 // each service must implement at-minimum the "required characteristics" for the given service type
6770 // see https://developers.homebridge.io/#/service/Lightbulb
0 commit comments