mirror of
https://github.com/dtwardow/homebridge-multi-tap-switch.git
synced 2026-11-01 20:18:30 +00:00
Show version in accessory infomration
This commit is contained in:
1 parent
505b8b0a4a
commit
8922e9cd80
3 files changed
+10
-3
No files matched your search
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": false,
|
||||||
"displayName": "Multi-Tap Switch",
|
"displayName": "Multi-Tap Switch",
|
||||||
"name": "homebridge-multitap-switch",
|
"name": "homebridge-multitap-switch",
|
||||||
"version": "1.0.0",
|
"version": "0.1.0",
|
||||||
"description": "A configurable multi-tap switch for i.e. switching scenes",
|
"description": "A configurable multi-tap switch for i.e. switching scenes",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import {CharacteristicValue, PlatformAccessory, Service} from 'homebridge';
|
|||||||
import {MultiTapSwitchPlatform} from './platform';
|
import {MultiTapSwitchPlatform} from './platform';
|
||||||
import {AccessoryState, DeviceConfig} from './config';
|
import {AccessoryState, DeviceConfig} from './config';
|
||||||
import {Logging} from './helper/logger';
|
import {Logging} from './helper/logger';
|
||||||
|
import {VERSION} from './settings';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Platform Accessory
|
* Platform Accessory
|
||||||
@@ -42,6 +43,7 @@ export class DeviceAccessory {
|
|||||||
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
this.accessory.getService(this.platform.Service.AccessoryInformation)!
|
||||||
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'TippyTapper')
|
.setCharacteristic(this.platform.Characteristic.Manufacturer, 'TippyTapper')
|
||||||
.setCharacteristic(this.platform.Characteristic.Model, 'SceneSwitch')
|
.setCharacteristic(this.platform.Characteristic.Model, 'SceneSwitch')
|
||||||
|
.setCharacteristic(this.platform.Characteristic.Version, VERSION)
|
||||||
.setCharacteristic(this.platform.Characteristic.SerialNumber, accessory.UUID);
|
.setCharacteristic(this.platform.Characteristic.SerialNumber, accessory.UUID);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -1,3 +1,6 @@
|
|||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const package_config = require('../package.json');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the name of the platform that users will use to register the plugin in the Homebridge config.json
|
* This is the name of the platform that users will use to register the plugin in the Homebridge config.json
|
||||||
*/
|
*/
|
||||||
@@ -6,4 +9,6 @@ export const PLATFORM_NAME = 'MultiTapSwitch';
|
|||||||
/**
|
/**
|
||||||
* This must match the name of your plugin as defined the package.json
|
* This must match the name of your plugin as defined the package.json
|
||||||
*/
|
*/
|
||||||
export const PLUGIN_NAME = 'homebridge-multitap-switch';
|
export const PLUGIN_NAME = 'homebridge-multitap-switch';
|
||||||
|
|
||||||
|
export const VERSION = package_config.version;
|
||||||
Reference in new issue
Block a user