-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix fetching of temp_sw in example.py #44
Conversation
Yes, before switching to API v6, you had:
SystemConfigV5 has the following attributes: SystemConfigV5 ....
Now with API v6:
SystemConfig has the following attributes: SystemConfig .... SystemConfigSensor
SystemConfigFan
|
Hmm, this confirms my intuition that the API version should be hard-coded, either in |
The way i see it, they only support the 'current/latest' version whatever it is. In this particular case i guess they really had no other choice than to rework the schema to support more features with some impact on rrd data also. There is no telling if this may or may not happen again in the future, but i believe this to be an exception. |
The only way i see to prevent any surprises is to default the API to (current) v6 in #22 I made it so you can set api_version to: aiofreepybox version releases could also follow this scheme to make things easier to understand for users in the long term |
@stilllman what do you think about this ? I have some ongoing changes into home assistant and don't want to work it twice. I'm waiting that you release a new version of aiofreepybox then ;) |
@SNoof85 I think that the solution proposed by @foreign-sub is the best we can have without rewriting the entire library, as it allows both "use frozen api" and "use latest available api". Since the API version is frozen in home assistant, things should be good. Why do you want a new release for home assistant? Do you want to integrate some new features? The auto detection is not merged yet unfortunately, is is something else that you would like to use? |
@stilllman i have some pending requests about the Freebox integration (mainly on home API) and few more sensors. As i would like also switch to API V6 i'll have some work again to do and this is not really easy to test without a new release (have to clone the repo and i'm not very easy with git commands 👎 ) |
Current open PR's cover almost everything still missing in the API with some extras, i'm currently working on typing everything but this is only a bonus and also a long and tedious work, so it's not really required to be finished if you want to do a release soon. I'm pretty much done on every PR on a functional basis, i'd say #22 #39 and #43 adds the most value, then #47 #17, then the remaining ones in no particular order. |
@SNoof85 you can clone my repo with:
this way you can merge in any branch you like in the aiofreepybox branch then copy the directory in the HA afpbx folder. |
This is not a repo problem, home assistant uses pypi packages 😄 that's why i asked to get a release (it was a pypi release). |
This one can be merged as soon as we clearly state that API version used must be >=6 |
The result I get when calling
get_config
is layouted like this:{'sensors': [{'id': 'temp_sw', 'value', '60', ...}, ...], ...}
@foreign-sub Can you confirm you have the same?