Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Allow (optional) manual specification of accessory information #165

Merged
merged 20 commits into from
Jul 24, 2017
Merged

Allow (optional) manual specification of accessory information #165

merged 20 commits into from
Jul 24, 2017

Conversation

schmittx
Copy link
Collaborator

@schmittx schmittx commented Jun 5, 2017

Adds ability to manually specify accessory information for each entity (if not specified, Homebridge will set it automatically).

You can specify the information (manufacturer, model, and serial number) using the following in customize.

customize:
  cover.garage_door:
    homebridge_mfg: Chamberlain
    homebridge_model: CIGCWC
    homebridge_serial: <REDACTED>

img_0753_small

@mention-bot
Copy link

@schmittx, thanks for your PR! By analyzing the history of the files in this pull request, we identified @robbiet480, @rcloran and @shmuelzon to be potential reviewers.

this.model = String(data.attributes.homebridge_model);
} else {
this.model = 'Rollershutter';
} this.service = new Service.WindowCovering();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple spaces found before 'this' no-multi-spaces

if (data.attributes && data.attributes.homebridge_model) {
this.model = String(data.attributes.homebridge_model);
} else {
this.model = `${toTitleCase(data.attributes.device_class)} Binary Sensor`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'toTitleCase' is not defined no-undef

this.service = service;
this.characteristic = characteristic;
this.onValue = onValue;
this.offValue = offValue;
this.offValue = offValue;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing spaces not allowed no-trailing-spaces

if (data.attributes && data.attributes.homebridge_model) {
this.model = String(data.attributes.homebridge_model);
} else {
this.model = `Climate`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings must use singlequote quotes

if (data.attributes && data.attributes.homebridge_model) {
this.model = String(data.attributes.homebridge_model);
} else {
this.model = `Climate`;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings must use singlequote quotes

@schmittx
Copy link
Collaborator Author

schmittx commented Jun 5, 2017

Apologies for the messy commit history, I'm still getting the hang of GitHub. I think this should be good to go now though.

@robbiet480
Copy link
Member

@schmittx If you can go ahead and fix the merge conflict I'll get this merged. Going to cut a new version now, as soon as you get this fixed I will cut another version for you.

This was referenced Jul 19, 2017
@schmittx
Copy link
Collaborator Author

@robbiet480 sounds good, I'll get it cleaned up this weekend. I'll also be making some new PRs as well, I've got air quality (binary) sensors working, battery tracking, and some other things working.

@schmittx
Copy link
Collaborator Author

Should be good to go now!

@robbiet480
Copy link
Member

@schmittx Did you have other PRs that you planned to open soon? If so, i'll merge this but wait to cut a release so you can get your other PRs in.

@schmittx
Copy link
Collaborator Author

schmittx commented Jul 23, 2017

@robbiet480 scratch that, go ahead and merge this PR and cut a new release. I'm pretty sure the new stuff I'm planning to submit will cause a number of conflicts when trying to merge with this PR. I'd rather start from a clean point. I'm planning to clean up a number of the files and (hopefully) simplify some of the required information by reducing the number of homebridge_blah_blah_blah required in customize.

@robbiet480
Copy link
Member

@schmittx I can just merge and not cut a release yet.

@robbiet480 robbiet480 merged commit faa6660 into home-assistant:master Jul 24, 2017
@schmittx schmittx deleted the custom-accessory-information branch July 24, 2017 20:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants