Skip to content

Commit

Permalink
chore: Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pgerke committed Jan 6, 2023
1 parent 655b898 commit 57d48bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sceneAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class SceneAccessory extends FreeAtHomeAccessory {
this.accessory.context.channel.outputs?.odp0000.value ?? "0"
);

/* Configure the Switch service for the switch actuator. */
/* Configure the Switch service for the scene actuator. */
this.service =
this.accessory.getService(this.platform.Service.Switch) ||
this.accessory.addService(this.platform.Service.Switch);
Expand All @@ -42,6 +42,7 @@ export class SceneAccessory extends FreeAtHomeAccessory {
if (value === this.stateOn) return;
else this.stateOn = value as boolean;

// Don't turn the state off, this is an auto-resetting button
if (!this.stateOn) {
this.platform.log.error(
`${this.accessory.displayName} (Scene Actuator ${this.serialNumber}) cannot be disabled`
Expand Down

0 comments on commit 57d48bb

Please sign in to comment.