Skip to content

Add default binary state#138

Open
BudzikM wants to merge 1 commit intomasterfrom
default-binary-state
Open

Add default binary state#138
BudzikM wants to merge 1 commit intomasterfrom
default-binary-state

Conversation

@BudzikM
Copy link
Contributor

@BudzikM BudzikM commented Dec 23, 2024

out_lvl_switch and color as well as other services may implement out_bin_switch with default_state interface only

@BudzikM BudzikM self-assigned this Dec 23, 2024
@boguslaw-wojcik
Copy link
Contributor

Please provide context why do we need this feature.

@BudzikM
Copy link
Contributor Author

BudzikM commented Jan 20, 2025

Please provide context why do we need this feature.

Most of the devices with on/off functionality included our FH Relay have configuration of the state after power cycle. Some of them by default are ON after power cycle which might be inappropriate/dangerous in some uses, i.e.. power blackout may cause the device to turn on.

We may discuss to add in this service parameters for future use to handle this behavior for all services.

| out | evt.binary.report | bool | Reports `true` when the switch is **on** and `false` when the switch is **off**. |
| in | cmd.default_state.get_report | null | Requests report of the default binary state after power up. |
| in | cmd.default_state.set | bool | Sets the binary state default binary state after power up. |
| out | evt.default_state.report | bool | Reports binary state after power up - `true` then **on**, `false` when **off**. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Add it to parameters service @BudzikM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants