pnbruckner / ha-entity-tz

Home Assistant Entity Time Zone Sensor
The Unlicense
3 stars 0 forks source link

Yield after calls to timezone_at in update_zones #5

Closed pnbruckner closed 8 months ago

pnbruckner commented 8 months ago

At startup, and whenever a zone or the core config changes, a list of zones is created to use in the config flow. For each existing zone, its time zone is determined to be compared to the core config time zone. This process of determining time zones can take a while and was being done in an event loop callback. This change moves that code into a coroutine that yields between the lengthy time zone calls.

Fixes #4.