0.5.1 • Published 8 months ago

homebridge-dummy-radio-switch v0.5.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 months ago

homebridge-dummy-radio-switch

Homebridge plugin that exposes a radio button selection with dummy switches.

Each "radio group" can have several switches, only one switch can be enabled at a time. If a switched is turned ON, all other switches are turned OFF.

Installation

Please install the plugin with the following command:

npm install -g homebridge-dummy-radio-switch

Configuration

{
    "platforms": [
        {
            "platform": "DummyRadioSwitchPlatform",
            "groups": [
                {
                    "name": "<GROUP-NAME>",
                    "displayAsPowerStrip": false,
                    "switches": [
                        {
                            "name": "<SWITCH-NAME-1>",
                            "isDefaultOn": false,
                            "timeout": 0,
                            "nextOnSwitchName": null
                        },
                        {
                            "name": "<SWITCH-NAME-2>",
                            "isDefaultOn": false,
                            "timeout": 0,
                            "nextOnSwitchName": null
                        },
                        ...
                    ],
                    "timeout": 0
                }
            ]
        }
    ]
}

groups: Array of all groups of switches that should be exposed to HomeKit. Each group is a separate accessory.

name: The name of the group, that is initially used as the display name.

displayAsPowerStrip: If set to true, outlets instead of switches are exposed to HomeKit. This provides a more compact UI in the Apple Home app. Defaults to false.

switches: Array of all switches of the group.

name: The name of the switch.

isDefaultOn (optional): A single switch in a group can be defined as the "default on". If a switch in a group has this property set to true, the group acts as a radio button group that always has one option "selected". This means if all switches are set to OFF, the switch that is marked as "default on" is set to ON.

nextOnSwitchName (optional): The name of the switch (in the same group) that should be switched to ON if the current switch is switched OFF. This overwrites the "default on" behavior.

timeout (optional): If a value is set (in seconds), a timer is started when the "selection" changes. When the timer elapses, the "selection" is reset to the button that is marked as isDefaultOn. If no isDefaultOn button is provided, all are switched off. You can set a per-group timeout or multiple per-switch timeout values.

0.5.1

8 months ago

0.3.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago

0.2.0

3 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago