nfarina / homebridge-tesla

Tesla plugin for homebridge: https://github.com/nfarina/homebridge
154 stars 38 forks source link

[Feature Request] add option for fixing the accessory name issue #118

Open EnixCoda opened 10 months ago

EnixCoda commented 10 months ago

Hi, thank you for this awesome project. I've set it up and My Model 3 has shown up in the Home App successfully.

I noticed the annoying accessory name issue mentioned in the readme. And read the issue of its fix. Found out that you've tried to fix it in 90609b6261f056950acdcdc2c6a5ae05d0b42fb1 but soon reverted in 2e52aade117ab84e1f9943bfbc7cc918dd2d4984 because The "ConfiguredName" characteristic did not behave as expected; it was impossible to set custom names through the Home app that persisted across Homebridge reboots

Then I tried to manually install the version of 90609b6261f056950acdcdc2c6a5ae05d0b42fb1 (which is 4.3.0 on NPM), it worked quite well for me because I do not need to rename them.

Now I am wondering if there could be an config field to optionally enable the fix for general users like myself. For example,

if (config.fixName) {
  // `fixName` can be configured via home bridge UI config page
  service.addOptionalCharacteristic(Characteristic.ConfiguredName);
  service.setCharacteristic(Characteristic.ConfiguredName, accessoryName);
}

I believe many users would be happy for it!