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

Fix zone services not working with YAML home zone #320

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Conversation

frenck
Copy link
Owner

@frenck frenck commented Aug 15, 2023

Description

Adds a workaround to get to the Zone storage collection.

Motivation and Context

Home Assistant doesn't set the Zone storage collection into the hass.data when the Home zone is defined/overriden in YAML. Causing Spook his zone services to fail.

This PR adds a workaround by grabbing the collection from the WebSocket API handlers. (Super dirty).

fixes #311

How has this been tested?

Defined the Home zone in YAML and restarted HA.
Confirmed the services now work, but don't work without the PR applied.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@frenck frenck added the bugfix Inconsistencies or issues which will cause a problem for users or implementors. label Aug 15, 2023
@frenck frenck merged commit 050ba52 into main Aug 15, 2023
@frenck frenck deleted the frenck-2023-1154 branch August 15, 2023 16:14
@martinhoess
Copy link

tested, works now like expected 👍

@frenck
Copy link
Owner Author

frenck commented Aug 16, 2023

Thanks for letting me know @martinhoess ❤️

../Frenck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Inconsistencies or issues which will cause a problem for users or implementors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New zone services do not work
2 participants