Skip to content

Commit 83e3313

Browse files
authored
fix: Correct typos (#19143)
Credit to `codespell`.
1 parent 45ce494 commit 83e3313

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributing to Zigbee2MQTT
22

3-
Everybody is invited and welcome to contribute to Zigbee2MQTT. Zigbee2MQTT is writen in JavaScript and is based upon [zigbee-herdsman](https://github.com/koenkk/zigbee-herdsman) and [zigbee-herdsman-converters](https://github.com/koenkk/zigbee-herdsman-converters). Zigbee-herdsman-converters contains all device definition, zigbee-herdsman is responsible for handling all communication with the adapter.
3+
Everybody is invited and welcome to contribute to Zigbee2MQTT. Zigbee2MQTT is written in JavaScript and is based upon [zigbee-herdsman](https://github.com/koenkk/zigbee-herdsman) and [zigbee-herdsman-converters](https://github.com/koenkk/zigbee-herdsman-converters). Zigbee-herdsman-converters contains all device definitions, zigbee-herdsman is responsible for handling all communication with the adapter.
44

55
- Pull requests are always created against the [**dev**](https://github.com/Koenkk/zigbee2mqtt/tree/dev) branch.
66
- Easiest way to start developing Zigbee2MQTT is by setting up a development environment (aka bare-metal installation). You can follow this [guide](https://www.zigbee2mqtt.io/guide/installation/01_linux.html) to do this.
77
- You can run the tests locally by executing `npm test`. Zigbee2MQTT enforces 100% code coverage, in case you add new code check if your code is covered by running `npm run test-with-coverage`. The coverage report can be found under `coverage/lcov-report/index.html`. Linting is also enforced and can be run with `npm run eslint`.
8-
- When you want to add support for a new devices no changes to Zigbee2MQTT have to be made, only to zigbee-herdsman-converters. You can find a guide for it [here](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).
8+
- When you want to add support for a new device no changes to Zigbee2MQTT have to be made, only to zigbee-herdsman-converters. You can find a guide for it [here](https://www.zigbee2mqtt.io/advanced/support-new-devices/01_support_new_devices.html).

lib/extension/availability.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export default class Availability extends Extension {
122122
@bind private publishAvailabilityForAllEntities(): void {
123123
for (const entity of [...this.zigbee.devices(false), ...this.zigbee.groups()]) {
124124
if (utils.isAvailabilityEnabledForEntity(entity, settings.get())) {
125-
// Publish initial availablility
125+
// Publish initial availability
126126
this.publishAvailability(entity, true, false, true);
127127

128128
if (entity.isDevice()) {

lib/extension/extension.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract class Extension {
99
protected addExtension: (extension: Extension) => Promise<void>;
1010

1111
/**
12-
* Besides intializing variables, the constructor should do nothing!
12+
* Besides initializing variables, the constructor should do nothing!
1313
*
1414
* @param {Zigbee} zigbee Zigbee controller
1515
* @param {MQTT} mqtt MQTT controller

lib/extension/homeassistant.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ export default class HomeAssistant extends Extension {
11031103
for (const expose of exposes.filter((e) => groupSupportedTypes.includes(e.type))) {
11041104
let key = expose.type;
11051105
if (['switch', 'lock', 'cover'].includes(expose.type) && expose.endpoint) {
1106-
// A device can have multiple of these types which have to discovered seperately.
1106+
// A device can have multiple of these types which have to discovered separately.
11071107
// e.g. switch with property state and valve_detection.
11081108
const state = expose.features.find((f) => f.name === 'state');
11091109
key += featurePropertyWithoutEndpoint(state);

lib/util/settings.schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
449449
"type": "boolean",
450450
"title": "Legacy availability payload",
451451
"requiresRestart": true,
452-
"description": "Payload to be used for device availabilty and bridge/state topics. true = text, false = JSON",
452+
"description": "Payload to be used for device availability and bridge/state topics. true = text, false = JSON",
453453
"default": true
454454
},
455455
"log_rotation": {
@@ -912,7 +912,7 @@
912912
"title": "Group off state",
913913
"default": "auto",
914914
"requiresRestart": true,
915-
"description": "Control when to publish state OFF for a group. 'all_members_off': only publish state OFF when all group memebers are in state OFF, 'last_member_state': publish state OFF whenever one of its members changes to OFF"
915+
"description": "Control when to publish state OFF for a group. 'all_members_off': only publish state OFF when all group members are in state OFF, 'last_member_state': publish state OFF whenever one of its members changes to OFF"
916916
},
917917
"filtered_attributes": {
918918
"type": "array",

test/availability.test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('Availability', () => {
5858
jest.useRealTimers();
5959
})
6060

61-
it('Should publish availabilty on startup for device where it is enabled for', async () => {
61+
it('Should publish availability on startup for device where it is enabled for', async () => {
6262
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/bulb_color/availability',
6363
'online', {retain: true, qos: 1}, expect.any(Function));
6464
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/remote/availability',
@@ -236,7 +236,7 @@ describe('Availability', () => {
236236
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(0);
237237
});
238238

239-
it('Should to enable availabilty for just one device', async () => {
239+
it('Should to enable availability for just one device', async () => {
240240
settings.set(['availability'], false);
241241
settings.set(['devices', devices.bulb_color.ieeeAddr, 'availability'], true);
242242

@@ -291,7 +291,7 @@ describe('Availability', () => {
291291
'offline', {retain: true, qos: 1}, expect.any(Function));
292292
});
293293

294-
it('Should publish availabiltiy payload in JSON format', async () => {
294+
it('Should publish availability payload in JSON format', async () => {
295295
settings.set(['advanced', 'legacy_availability_payload'], false);
296296
await resetExtension();
297297
MQTT.publish.mockClear();
@@ -328,7 +328,7 @@ describe('Availability', () => {
328328
expect(devices.bulb_color.ping).toHaveBeenCalledTimes(1);
329329
});
330330

331-
it('Should publish availabilty for groups', async () => {
331+
it('Should publish availability for groups', async () => {
332332
settings.set(['devices', devices.bulb_color_2.ieeeAddr, 'availability'], true);
333333
await resetExtension();
334334
expect(MQTT.publish).toHaveBeenCalledWith('zigbee2mqtt/group_tradfri_remote/availability',

0 commit comments

Comments
 (0)