Skip to content

Commit

Permalink
Deploying to master from @ 4443f5f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Jul 27, 2023
1 parent f398efa commit 63c6a23
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 18 deletions.
4 changes: 2 additions & 2 deletions docs/api/accessory-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### API.registerAccessory
> API.registerAccessory(accessoryName: string, constructor: AccessoryPluginConstructor): void
Register a "Accessory" type plugin. Accessory style plugins only expose a single accessory, but can be configured multiple times in the Homebridge `config.json` (once per accessory the user wants to create).
Register an "Accessory" type plugin. Accessory style plugins only expose a single accessory, but can be configured multiple times in the Homebridge `config.json` (once per accessory the user wants to create).

```js
module.exports = (api) => {
Expand Down Expand Up @@ -60,4 +60,4 @@ class ExampleAccessoryPlugin {
this.log.info('Setting switch state to:', value);
}
}
```
```
4 changes: 2 additions & 2 deletions docs/api/characteristics.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ switchService.getCharacteristic(this.api.hap.Characteristic.On)
### Characteristic.onGet
> Characteristic.onGet(() => Promise<value>): Characteristic
The `get` event is called when HomeKit wants get retrieve the current state of a device.
The `get` event is called when HomeKit wants to get retrieve the current state of a device.

The handler function must return the current state of the characteristic.

Expand Down Expand Up @@ -90,7 +90,7 @@ switchService.getCharacteristic(this.api.hap.Characteristic.On)
Consider using the promise-based <a href="/#/api/characteristics#characteristiconget">Characteristic.onGet</a> method instead.
</div>

The `get` event is called when HomeKit wants get retrieve the current state of a device.
The `get` event is called when HomeKit wants to get retrieve the current state of a device.

The handler function contains one argument:

Expand Down
2 changes: 1 addition & 1 deletion docs/api/platform-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ExamplePlatformPlugin {
### API.publishExternalAccessories
> API.publishExternalAccessories(pluginIdentifier: string, accessories: PlatformAccessory[]): void
Accessories published externally will need to be paired seperately by the user. Common uses for external accessories include Cameras and TVs.
Accessories published externally will need to be paired separately by the user. Common uses for external accessories include Cameras and TVs.

### API.updatePlatformAccessories
> API.updatePlatformAccessories(accessories: PlatformAccessory[]): void
Expand Down
6 changes: 3 additions & 3 deletions docs/config-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Setting default values is a great way to ensure your users get up and running as

### Placeholder Values

Placeholder values should be used for optional fields that have a default value defined in your plugins code. The place holder value will not be saved to the `config.json` unless modified by the user.
Placeholder values should be used for optional fields that have a default value defined in your plugins code. The placeholder value will not be saved to the `config.json` unless modified by the user.

```json
{
Expand Down Expand Up @@ -230,7 +230,7 @@ Dropdown select boxes can be implemented using the JSON Schema `oneOf` attribute

### Typeahead Data Lists

Datalists suggest values to the user in a similar way to drop down boxes, but still allowing the user to enter their own value if they like.
Data-lists suggest values to the user in a similar way to drop down boxes, but still allowing the user to enter their own value if they like.

```json
{
Expand Down Expand Up @@ -763,7 +763,7 @@ If you have more complex requirements than what the standard `config.schema.json

### Plugins Using This

Looking at example of existing schemas is a great way to learn.
Looking at examples of existing schemas is a great way to learn.

These are examples of plugins that currently implement the Plugin Settings GUI using the `config.schema.json`:

Expand Down
4 changes: 2 additions & 2 deletions docs/custom-plugin-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ await homebridge.updatePluginConfig(pluginConfig);
Saves the plugin config changes to the Homebridge `config.json`. This is the equivalent of clicking the *Save* button.

This should be used sparingly, for example, after a access token is generated.
This should be used sparingly, for example, after an access token is generated.

You must call `await homebridge.updatePluginConfig()` first.

Expand All @@ -170,7 +170,7 @@ const schema = await homebridge.getPluginConfigSchema();

> `homebridge.getCachedAccessories(): Promise<CachedAccessory[]>;`
Returns the any cached accessories for the plugin
Returns any cached accessories for the plugin

```ts
const cachedAccessories = await homebridge.getCachedAccessories();
Expand Down
24 changes: 18 additions & 6 deletions docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,40 @@

This site contains resources to help Homebridge plugin developers.

### Homebridge Plugin Template
### Homebridge Plugin Templates

We have created the [homebridge-plugin-template](https://github.com/homebridge/homebridge-plugin-template) which you can use as a base to help you get started developing your own plugin.
We have created templates which you can use as a base to help you get started developing your own plugin.

The plugin template offers the following features:
These plugin templates offer the following features:

* A base [dynamic platform](/#/api/platform-plugins) plugin that can easily be expanded
* [TypeScript](https://www.typescriptlang.org/) with ESLint rules and Homebridge typings pre-configured
* Automatic code compiling and Homebridge restart on code change with `npm run watch`

### Example Plugins
#### Dynamic Platform Template

- [homebridge-plugin-template](https://github.com/homebridge/homebridge-plugin-template)

#### Camera Plugin Template

- [homebridge-camera-plugin-template](https://github.com/homebridge/homebridge-plugin-camera-template)

### Deprecated Templates

The following templates are kept here for reference, but are no longer maintained. When creating a new plugin, it is recommended to use the above `homebridge-plugin-template` instead.

For existing plugins, it is recommended to update your plugin to the dynamic platform type.

These example plugins are written in [TypeScript](https://www.typescriptlang.org/).

##### Accessory Plugins
#### [DEPRECATED] Accessory Plugins

[Accessory plugins](/#/api/accessory-plugins) are the most basic and simplest plugins for homebridge. They should be used if you only want to
expose a single accessory and don't require any special functionality.

* [Accessory Plugin](https://github.com/homebridge/homebridge-examples/blob/master/accessory-example-typescript): A simple Switch accessory.

##### Platform Plugins
#### [DEPRECATED] Platform Plugins

[Platform plugins](/#/api/platform-plugins) are able to expose multiple accessories. Additionally, they are required if you want to use the
Controller API.
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<style>@charset "UTF-8";:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#adb4c0;--gray-dark:#747f94;--primary:#612094;--secondary:#5d6778;--success:#5cb377;--info:#5b99ea;--warning:#EEBF41;--danger:#d26d69;--light:white;--dark:#747f94;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-family-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#252930;text-align:left;background-color:#fff}@media print{*,*:before,*:after{text-shadow:none!important;box-shadow:none!important}@page{size:a3}body{min-width:992px!important}}body{font-family:Poppins,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:#5d6778;padding-top:69px}</style><link rel="stylesheet" href="styles.b825bc44fc713531.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.b825bc44fc713531.css"></noscript></head>
<body class="docs-page">
<app-root></app-root>
<script src="runtime.53a40d170fc63228.js" type="module"></script><script src="polyfills.edbded93dd0cd5ec.js" type="module"></script><script src="scripts.ce23c1b1951b7cbc.js" defer></script><script src="main.362379885816dddc.js" type="module"></script>
<script src="runtime.53a40d170fc63228.js" type="module"></script><script src="polyfills.edbded93dd0cd5ec.js" type="module"></script><script src="scripts.ce23c1b1951b7cbc.js" defer></script><script src="main.0216d89150367af7.js" type="module"></script>



Expand Down
1 change: 1 addition & 0 deletions main.0216d89150367af7.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion main.362379885816dddc.js

This file was deleted.

0 comments on commit 63c6a23

Please sign in to comment.