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

Options flow with update interval #54 #105

Conversation

patrickvorgers
Copy link
Contributor

This implements issue #54.

The integration now provides OptionFlow which enables the user to configure the options of the integration:

  • update interval
  • energy sensor

@patrickvorgers
Copy link
Contributor Author

@marcoboers can you have a look?

@marcoboers
Copy link
Owner

I'm currently on holiday. I'll check it out when I'm back next week.

@marcoboers
Copy link
Owner

Closing this one since these changes were also in #107 that has been merged

@marcoboers marcoboers closed this Sep 13, 2024
@patrickvorgers
Copy link
Contributor Author

patrickvorgers commented Sep 13, 2024

I had a quick look and it seems that I am missing the changes in the strings.json. I have to check whether I forgot to include it.

{
    "config": {
        "step": {
            "user": {
                "description": "Set up your Quatt heatpump for monitoring.",
                "data": {
                    "ip_address": "[%key:common::config_flow::data::ip%]"
                },
                "data_description": {
                    "ip_address": "Without http:// and port."
                }
            }
        },
        "error": {
            "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
        },
        "abort": {
            "already_configured": "[%key:common::config_flow::abort::already_configured%]"
        }
    },
    "options": {
        "step": {
            "init": {
                "description": "Quatt options",
                "data": {
                    "scan_interval": "Update interval (Seconds)",
                    "power_sensor": "Power sensor (Optional)"
                },
                "data_description": {
                    "scan_interval": "Number of seconds between requesting information from the Quatt.",
                    "power_sensor": "External energy sensor that measures the current energy consumption of the Quatt."
                }
            }
        }
    }
}

@marcoboers
Copy link
Owner

Hmm, not sure where I missid this.
With regard to the auto discovery PR. The config.step.confirm part should still be there right?
So it should become this if I'm correct?

{
    "config": {
        "step": {
            "user": {
                "description": "Set up your Quatt heatpump for monitoring.",
                "data": {
                    "ip_address": "[%key:common::config_flow::data::ip%]"
                },
                "data_description": {
                    "ip_address": "Without http:// and port."
                }
            },
            "confirm": {
                "description": "[%key:common::config_flow::description::confirm_setup%]"
            }
        },
        "error": {
            "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
        },
        "abort": {
            "already_configured": "[%key:common::config_flow::abort::already_configured%]"
        }
    },
    "options": {
        "step": {
            "init": {
                "description": "Quatt options",
                "data": {
                    "scan_interval": "Update interval (Seconds)",
                    "power_sensor": "Power sensor (Optional)"
                },
                "data_description": {
                    "scan_interval": "Number of seconds between requesting information from the Quatt.",
                    "power_sensor": "External energy sensor that measures the current energy consumption of the Quatt."
                }
            }
        }
    }
}

@patrickvorgers
Copy link
Contributor Author

More is missing, I will created a new PR which contains the changes needed for the optionsFlow

@patrickvorgers patrickvorgers mentioned this pull request Sep 13, 2024
3 tasks
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.

2 participants