Skip to content

Commit

Permalink
Chore: new version information
Browse files Browse the repository at this point in the history
  • Loading branch information
jasper-seinhorst committed Mar 29, 2023
1 parent 8dbd38a commit feaa3ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Homebridge Porsche Taycan
This Homebrudge plugin offers a range of useful features for your Porsche Taycan, including real-time monitoring of battery level and charging status. Moreover, it also enables you to easily toggle the direct charging option on or off.
This Homebrudge plugin offers a range of useful features for your Porsche Taycan, including real-time monitoring of battery level and charging status. Moreover, it also enables you to easily toggle the direct charging or direct climatisation options on or off.

## Supported cars:
- Taycan (all years)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Homebridge Porsche Taycan",
"name": "homebridge-porsche-taycan",
"version": "0.8.1",
"version": "0.9.0",
"description": "Control your Porsche Taycan through the home app",
"license": "Apache-2.0",
"author": "Jasper Seinhorst",
Expand Down
9 changes: 3 additions & 6 deletions src/Platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ export class PorscheTaycanPlatform implements DynamicPlatformPlugin {
// Register Charger
const chargerUuid = this.api.hap.uuid.generate(`${vehicle.vin}-charger`);
const chargerExistingAccessory = this.accessories.find(accessory => accessory.UUID === chargerUuid);
const chargerAccessoryName = 'Charger';

if (chargerExistingAccessory) {
platformVehicle.accessories.push(new Charger(this.config, this.log, this.api, chargerExistingAccessory));
} else {
this.log.info('Charger added as accessory');
const accessory = new this.api.platformAccessory(chargerAccessoryName, chargerUuid);
const accessory = new this.api.platformAccessory('Charger', chargerUuid);
accessory.context.device = vehicle;
platformVehicle.accessories.push(new Charger(this.config, this.log, this.api, accessory));
this.api.registerPlatformAccessories('homebridge-porsche-taycan', 'PorscheTaycan', [accessory]);
Expand All @@ -55,13 +54,12 @@ export class PorscheTaycanPlatform implements DynamicPlatformPlugin {
// Register DirectCharge
const directChargeUuid = this.api.hap.uuid.generate(`${vehicle.vin}-direct-charge`);
const directChargeExistingAccessory = this.accessories.find(accessory => accessory.UUID === directChargeUuid);
const directChargeAccessoryName = 'Direct Charge';

if (directChargeExistingAccessory) {
platformVehicle.accessories.push(new DirectCharge(this.config, this.log, this.api, directChargeExistingAccessory));
} else {
this.log.info('Direct Charge added as accessory');
const accessory = new this.api.platformAccessory(directChargeAccessoryName, directChargeUuid);
const accessory = new this.api.platformAccessory('Direct Charge', directChargeUuid);
accessory.context.device = vehicle;
platformVehicle.accessories.push(new DirectCharge(this.config, this.log, this.api, accessory));
this.api.registerPlatformAccessories('homebridge-porsche-taycan', 'PorscheTaycan', [accessory]);
Expand All @@ -70,13 +68,12 @@ export class PorscheTaycanPlatform implements DynamicPlatformPlugin {
// Register DirectClimatisation
const directClimatisationUuid = this.api.hap.uuid.generate(`${vehicle.vin}-direct-climatisation`);
const directClimatisationExistingAccessory = this.accessories.find(accessory => accessory.UUID === directClimatisationUuid);
const directClimatisationAccessoryName = 'Direct Climatisation';

if (directClimatisationExistingAccessory) {
platformVehicle.accessories.push(new DirectClimatisation(this.config, this.log, this.api, directClimatisationExistingAccessory));
} else {
this.log.info('Direct Climatisation added as accessory');
const accessory = new this.api.platformAccessory(directClimatisationAccessoryName, directClimatisationUuid);
const accessory = new this.api.platformAccessory('Direct Climatisation', directClimatisationUuid);
accessory.context.device = vehicle;
platformVehicle.accessories.push(new DirectClimatisation(this.config, this.log, this.api, accessory));
this.api.registerPlatformAccessories('homebridge-porsche-taycan', 'PorscheTaycan', [accessory]);
Expand Down

0 comments on commit feaa3ff

Please sign in to comment.