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

feat: add configuration options to change the upstream URL #62

Merged
merged 20 commits into from
Jun 12, 2023

Conversation

edurenye
Copy link

@edurenye edurenye commented Apr 15, 2023

Allows selecting a different Cloud service to upload. Also introduces Local-only mode for those who want to use Local Push without sending the data off to any Cloud service.

Wibeee options

When running the new version for the first time the ConfigEntry is migrated to version 2 to support the new configuration select box.

@edurenye
Copy link
Author

I started to work on this issue but I'm getting an error that I can't figure out.

2023-04-15 21:04:31.763 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up wibeee platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 304, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/wibeee/sensor.py", line 203, in async_setup_entry await get_nest_proxy( TypeError: get_nest_proxy() takes 1 positional argument but 2 were given

But the code actually takes 2 positional arguments:
async def get_nest_proxy(
hass: HomeAssistant,
entry: ConfigEntry
) -> NestProxy:

Copy link
Owner

@luuuis luuuis left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I agree with supporting different upstreams, the only thing I would like to explore is having a list of builtin upstreams that users can select, instead of providing text boxes.

Please have a look at my comments and let me know what you think.

custom_components/wibeee/nest.py Outdated Show resolved Hide resolved
custom_components/wibeee/nest.py Outdated Show resolved Hide resolved
custom_components/wibeee/sensor.py Outdated Show resolved Hide resolved
@luuuis
Copy link
Owner

luuuis commented Jun 8, 2023

@edurenye I have pushed a few commits. Please see the updated description for how it is configured now.

Are you able to test this locally? Preliminary tests are working for me but since the clamps on my Wibeee are measuring devices that are not often the device ends up sending data only every 1 minute anyway.

@luuuis luuuis merged commit bb596f6 into luuuis:main Jun 12, 2023
@edurenye
Copy link
Author

@edurenye I have pushed a few commits. Please see the updated description for how it is configured now.

Are you able to test this locally? Preliminary tests are working for me but since the clamps on my Wibeee are measuring devices that are not often the device ends up sending data only every 1 minute anyway.

Nice, I'll try it out, thank you!

@edurenye
Copy link
Author

Well, I'll wait to test the pushing since some times it malfunctions when changing the configuration and I need to reset the wibeee, wanna be there phisically to be able to reset, I contacted SolarProfit regarding this issue and they said a technician would contact me but it's been a while and the haven't contacted me, so I'll have to call them again.

@luuuis luuuis changed the title Add configuration options to change the upstream URL feat: add configuration options to change the upstream URL Jun 13, 2023
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