Skip to content

Update stateroles.md - add switch.feature #604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

Garfonso
Copy link
Contributor

Add the role switch.feature do distinguish switching on / off a feature like "childlock" or "open window detection" from switching power or switching a mode.

It could be useful in the future to add a generic "features" thingie in types.

Loosely connected to this issue in type-detector ioBroker/ioBroker.type-detector#118 From the type-detector perspective the role switch should not be used at all.

add the role `switch.feature` do distinguish switching on / off a feature like "childlock" or "open window detection" from switching power or switching a mode. 

It could be useful in the future to add a generic "features" thingie in types. 

Loosely connected to this issue in type-detector ioBroker/ioBroker.type-detector#118
From a type-detector perspective the role `switch` should not be used at all.
@Garfonso
Copy link
Contributor Author

Garfonso commented Jun 6, 2025

@GermanBluefox can you have a look here? Or @Apollon77?

@Apollon77 Apollon77 self-requested a review June 6, 2025 20:08
Copy link
Collaborator

@Apollon77 Apollon77 left a comment

Choose a reason for hiding this comment

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

For me ok. solves a problem

@GermanBluefox
Copy link
Collaborator

Why not switch.mode for more precise?

@J-Paul0815
Copy link

@GermanBluefox

Why not switch.mode for more precise?

Why not simply adjust the RegEX for POWER as stated in the description, namely exclusively switch.power I haven't found anything where switch was used for POWER for thermostats, only switch.power like in tado, for example. But better an unsightly solution (switch.mode or switch.feature) than no solution at all.
ioBroker/ioBroker.type-detector#118

@GermanBluefox
Copy link
Collaborator

@GermanBluefox

Why not switch.mode for more precise?

Why not simply adjust the RegEX for POWER as stated in the description, namely exclusively switch.power I haven't found anything where switch was used for POWER for thermostats, only switch.power like in tado, for example. But better an unsightly solution (switch.mode or switch.feature) than no solution at all. ioBroker/ioBroker.type-detector#118

I would suppose to use "switch.power" and "switch.mode" and adjust the type-detector, that will try first to find switch power and then just switch.....

@Apollon77
Copy link
Collaborator

I checked. switch.mode alone is also not used. So we could also use this. And „a generic mode flag“ could have the same purpose than switch.feature.

@J-Paul0815 for thermostat alone adjusting switch.power regex to not allow „switch“ in type detector is „just“ a backward compatibility topic.
but here we discuss the general topic.

@Garfonso
Copy link
Contributor Author

Garfonso commented Jun 7, 2025

OK, then let's use switch.mode.

@Garfonso
Copy link
Contributor Author

Garfonso commented Jun 7, 2025

I changed the PR:

@Apollon77
Copy link
Collaborator

Please see the discussed counter proposal in https://github.com/ioBroker/ioBroker.docs/pull/607/files

@Garfonso Garfonso closed this Jun 14, 2025
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.

4 participants