Skip to content
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

Provide context of last relay switch #1368

Closed
mcspr opened this issue Nov 23, 2018 · 2 comments
Closed

Provide context of last relay switch #1368

mcspr opened this issue Nov 23, 2018 · 2 comments

Comments

@mcspr
Copy link
Collaborator

mcspr commented Nov 23, 2018

ref #1264

What about having relay_t struct extended with module-specific enum, e.g

enum class SwitchContext {
#if TERMINAL_SUPPORT
    TERMINAL,
#endif
#if BUTTON_SUPPORT
    BUTTON,
#endif
#if DOMOTICZ_SUPPORT
    DOMOTICZ,
#endif
#if THINGSPEAK_SUPPORT
    THINGSPEAK,
#endif
#if MQTT_SUPPORT
    MQTT,
#endif
    NONE
};

Plus, additional option to ignore same context when it is the source of the switch.

@stale
Copy link

stale bot commented Jan 22, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 22, 2019
@mcspr
Copy link
Collaborator Author

mcspr commented Jan 22, 2019

Going with slightly different approach (not hardcoding all possible sources), so might as well close this.

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

No branches or pull requests

1 participant