wxt9861 / esxi_stats

ESXi component for Home Assistant
MIT License
145 stars 40 forks source link

snapshots not working in 0.7.0.beta3 #77

Closed pathia closed 7 months ago

pathia commented 2 years ago

Describe the bug Snapshots not working. I get. It does work in 0.7.0.beta2 I get this in the home assistant log: 2022-08-05 21:19:06.347 ERROR (MainThread) [custom_components.esxi_stats] free variable 'notify' referenced before assignment in enclosing scope

To Reproduce Steps to reproduce the behavior: Go to dev tools in HA > services and then: service: esxi_stats.create_snapshot data: host: 192.168.1.x vm: vmname name: nightly snapshot2 memory: true quiesce: true

Expected behavior A snapshot I don't see the snapshot task in esxi recent tasks

Screenshots If applicable, add screenshots to help explain your problem.

ESXi environment (please complete the following information):

Additional context Add any other context about the problem here.

wxt9861 commented 2 years ago

This is related to #69

You can try to go to the integrations page in HA, click on configure for the esxi stats integration and check/uncheck the Notify box.

pathia commented 2 years ago

Thanks. Do you mean 'Create service call notifications' ?

pathia commented 2 years ago

Thanks. Do you mean 'Create service call notifications' ?

pathia commented 2 years ago

I tried toggling the Create service call notifications. Whenever I have it enabled the snapshot command works (tried using both beta 3 and beta 4) But I don't want a notification for each snapshot service call. I'm now back to beta 2 since I do want nightly snapshots :)

wxt9861 commented 2 years ago

So you are saying that if you toggle it and save then untoggle it and save, snapshots stop working?

pathia commented 2 years ago

Sorry for the delay in responding. Yes that's what I'm saying. Tonight I again did some testing with 0.7.0beta4 (installed using reinstall option in HACS) restarted HA afterwarts. notification were disabled initially snapshots weren't working when calling the service after enabling "Create service call notifications" still not. after restarting HA : snapshots were working. now since I don't want notifications I disabled them again. >> snapshots were still working. after restarting HA snapshots were again not working.

wxt9861 commented 1 year ago

This should be addressed now in 0.7.0beta7

pathia commented 1 year ago

Awesome. I updated yesterday and this night my automatic snapshots executed successfully !