-
Notifications
You must be signed in to change notification settings - Fork 12
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
Errors after server maintenance #40
Comments
Glad I found your opened issue, same issue here, I tried deleting the integration, restarting and re-adding it with no success. |
I am experiencing the same |
Same here |
+1 |
+1. I use my milas temperatures to handle equalizing the house with a helper's statical range between my basement mila and upstairs mila and enable my hvac fan based on these to decrease the delta. Plz fix <3 |
Using milasdk and the example script the following is observed: <<< {"errors":[{"message":"Validation error (FieldUndefined@[owner/appliances/smartModes]) : Field 'smartModes' in type 'Appliance' is undefined","locations":[{"line":27,"column":7}],"extensions":{"classification":"ValidationError"}}]}
Traceback (most recent call last):
File "C:\Users\Zak\Documents\Code\milasdk\lib\site-packages\milasdk\api.py", line 62, in _execute
return await session.execute(document, variable_values)
File "C:\Users\Zak\Documents\Code\milasdk\lib\site-packages\gql\client.py", line 1639, in execute
raise TransportQueryError(
gql.transport.exceptions.TransportQueryError: {'message': "Validation error (FieldUndefined@[owner/appliances/smartModes]) : Field 'smartModes' in type 'Appliance' is undefined", 'locations': [{'line': 27, 'column': 7}], 'extensions': {'classification': 'ValidationError'}}
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\Zak\Documents\Code\milasdk\main.py", line 36, in <module>
loop.run_until_complete(main())
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "c:\Users\Zak\Documents\Code\milasdk\main.py", line 32, in main
await update(api)
File "c:\Users\Zak\Documents\Code\milasdk\main.py", line 16, in update
r = await api.get_appliances()
File "C:\Users\Zak\Documents\Code\milasdk\lib\site-packages\milasdk\api.py", line 126, in get_appliances
result = await self._execute(query)
File "C:\Users\Zak\Documents\Code\milasdk\lib\site-packages\milasdk\api.py", line 78, in _execute
raise MilaError("Transport reported query error") from ex
milasdk.exceptions.MilaError: Transport reported query error |
Until author has fixed it correctly for the API change if you navigate to the site-packages directory and edit milasdk/gql/queries.py Comment out lines 31-40 ds.Appliance.smartModes.select(
ds.SmartModes.quiet.select(ds.QuietMode.isEnabled),
ds.SmartModes.housekeeper.select(ds.HousekeeperMode.isEnabled),
ds.SmartModes.quarantine.select(ds.QuarantineMode.isEnabled),
ds.SmartModes.sleep.select(ds.SleepMode.isEnabled),
ds.SmartModes.turndown.select(ds.TurndownMode.isEnabled),
ds.SmartModes.whitenoise.select(ds.WhitenoiseMode.isEnabled),
ds.SmartModes.powerSaver.select(ds.PowerSaverMode.isEnabled),
ds.SmartModes.childLock.select(ds.ChildLockMode.isEnabled)
), If you're using Home Assistant in a docker container you must be in the container before you edit the file at:
After which you will need to restart Home Assistant. |
+1 |
Excellent debugging @zemerick1 Thank you! |
I don't seem to have the location /usr/local/lib/python3.12/site-packages/milasdk/gql but it is referenced in the error my logs. I have the Home Assistant Green. Any help would be appreciated. On what location I can find this file to edit. |
If you are running HAOS, you will need to get a bash shell on the homeassistant container. If you have the 'Advanced SSH & Web Terminal" add-on installed you can run the following docker command: exec -it homeassistant bash Then you should be able to use vi to edit /usr/local/lib/python3.12/site-packages/milasdk/gql/queries.py |
I don't have that path |
you need to run |
This is fire! as someone who works in a tehcnical world and knows what docker is but doesn't have much experience this is the comment that solved my final blockage! A massive and huge thanks to @zemerick1 for doing the heavy liften and exceptional debugging! For anyone else trying to make sense of all the previous (really honestly amazing comments and help) but having a hard time and just need basic instructions here is what I did:
Vi cheat sheet
|
You should know that if you're running HAOS, the package will likely get reinstalled on HA updates and these changes will need repeating |
If I am on home assistant core is there away to find this file? |
any suggestions since my HA does not use docker? |
I'm far from an expert, but since HAOS is just a managed docker instance, i would assume that HA Core is what is running inside. So just follow my steps starting at number 3. |
Unfortunately the folder pythons3.12 does not exist on HA core running on a green box. Any ideas where the access the file to be updated. Thanks. |
Did you find a solution? |
I did not, I am in the same boat as you. I do not have python3.12 under /usr/local/lib, and there is no docker containers running on HASS Core. |
3.12 is the version of python the box is running. Use python -V or python3 -V to find the version you are using then navigate to that folder. ie: /usr/local/lib/pythonX.YY/site-packages/ |
Possible temporary solution for sanghviharshit/ha-mila#40
This seems to be applicable to instance of Home Assistant running in a docker container, but doesn’t address the issue experienced running HA on a green box for example… |
I am running HA on an NUC not using docker. From what I was understanding home assistant uses docker containers with HAOS to manage environments. |
Thanks for the feedback. I’ve previously tried to run the discussed docker command, but received the error below. On the other hand, I may not be running the command correctly… |
any luck figuring this out? |
As I got tired of commenting out the lines on every update and this project seems to sadly be dead. I have forked the python package and made the changes so the integration can point to that library instead. THIS IS DONE WITH NO INTENTION OF SUPPORT OR UPDATES. If it breaks, it breaks. To switch to using this. In |
@TomBrien works like a charm — great idea, thank you! |
@TomBrien thank you! |
@TomBrien Thank you! |
PRs done, action required from @simbaja and then @sanghviharshit to close this. |
Looks like something broke after their most recent server maintenance. I can't find any more helpful logs.
The text was updated successfully, but these errors were encountered: