frenck / spook

A scary 👻 powerful toolbox 🧰 for Home Assistant 🏡
https://spook.boo
MIT License
381 stars 36 forks source link

Fix zone services not working with YAML home zone #320

Closed frenck closed 9 months ago

frenck commented 9 months ago

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

Checklist

sonarcloud[bot] commented 9 months ago

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

martinhoess commented 9 months ago

tested, works now like expected 👍

frenck commented 9 months ago

Thanks for letting me know @martinhoess ❤️

../Frenck