esxi_stats icon indicating copy to clipboard operation
esxi_stats copied to clipboard

Unable to change Host State Attribute

Open ianfretwell opened this issue 2 years ago • 13 comments

Having changed my config to point at my vCenter rather than my host - I find that I cannot change the Host State Attribute (to any of the options - although what I want is cpuusage_ghz).

When I click submit I get the following message: -

User input malformed: expected bool for dictionary value @ data['notify']

All I can do is close the window.

Can I make the change manually in code - and if so where ?

Environment is: - HA 2023.2.5 VCSA 8.0b ESXi 8.0b

Thanks.

ianfretwell avatar Feb 16 '23 12:02 ianfretwell

I am not sure - v8 introduces a new API and I haven't checked into it yet. Need to migrate component to new API first before looking into this issue.

wxt9861 avatar Feb 28 '23 17:02 wxt9861

Sorry - I think I read this wrong the first time.

What version of the component are you using? If you're on a beta version, can you try beta7?

wxt9861 avatar Mar 02 '23 20:03 wxt9861

I'm now on the beta7 version...the logs show this after startup:-

Config entry '192.168.6.231' for esxi_stats integration not ready yet: local variable 'host_power_policy' referenced before assignment; Retrying in background

If I add a second instance and target the host directly - the initial connection is made successfully but I still cannot make any changes as per my original post.

ianfretwell avatar Mar 03 '23 08:03 ianfretwell

That's interesting. Anyway you can provide a log? Is 192.168.2.231 IP of the vCenter? I think the error is coming during get_host_info but I need to verify.

wxt9861 avatar Mar 03 '23 16:03 wxt9861

I'll try to sort the logs out when I'm home.

Yes, 192.168.6.231 is the vCenter. It's actually at another location (LAN-LAN VPN) and is permanently on whereas my host is at home and only on when I need it.

ianfretwell avatar Mar 03 '23 16:03 ianfretwell

Thank you. The location shouldn't matter as long as you can reach it, but I think what's happening is the component is trying to pull host_power_policy of vCenter itself. vCenter itself wouldn't have this information, which results in an error.

wxt9861 avatar Mar 03 '23 16:03 wxt9861

Apologies for having to ask - where do I get the logs ? - I've enabled debug logging but can't see where they actually get put ? (and there's no option to 'download diagnostics').

Thanks.

ianfretwell avatar Mar 03 '23 17:03 ianfretwell

The logs generally end up in your config folder in a file called home-assistant.log

wxt9861 avatar Mar 08 '23 14:03 wxt9861

Also encountering this issue -- HA: 2023.6.1 VC: 7.0.3.01100 ESXi: 7.0.2, 17867351

Receive following error when attempting to configure: User input malformed: expected bool for dictionary value @ data['notify']

Also receive the 'host_power_policy' error in HA logs.

Let me know if you need any additional information/logs to aid in troubleshooting!

christophermichaelshaw avatar Jun 14 '23 00:06 christophermichaelshaw

@christophermichaelshaw Which version do you have installed?

wxt9861 avatar Jun 14 '23 00:06 wxt9861

@wxt9861 Running 0.7.0beta7. Happy to try other versions if you deem it valuable for troubleshooting.

christophermichaelshaw avatar Jun 14 '23 00:06 christophermichaelshaw

@christophermichaelshaw

I am assuming your integration is pointing at the vCenter? At the moment, changing power policy via vCenter is not supported (it is mentioned in the documentation, as well). That's something I plan to address, however not running vCenter myself, it presents a bit of a challenge.

For the error stating User input malformed: expected bool for dictionary value @ data['notify'] - do you keep receiving this error after your reload the integration or restart home assistant?

wxt9861 avatar Jun 14 '23 18:06 wxt9861

@christophermichaelshaw

I am assuming your integration is pointing at the vCenter? At the moment, changing power policy via vCenter is not supported (it is mentioned in the documentation, as well). That's something I plan to address, however not running vCenter myself, it presents a bit of a challenge.

For the error stating User input malformed: expected bool for dictionary value @ data['notify'] - do you keep receiving this error after your reload the integration or restart home assistant?

Yes, I am attempting to add VC. I haven't modified (nor attempted) the power policy -- I receive the error after adding VC.

christophermichaelshaw avatar Jun 16 '23 14:06 christophermichaelshaw