mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Cleanup climate platform for async update_ha_state / migrate generic thermostat (#5679)
* Cleanup climate from blocking stuff / migrate generic * Migrate generic thermostat * fix tests * fix lint
This commit is contained in:
committed by
Paulus Schoutsen
parent
647a93801c
commit
10a104271e
@@ -199,7 +199,10 @@ numeric_state_from_config = _threaded_factory(async_numeric_state_from_config)
|
||||
|
||||
|
||||
def state(hass, entity, req_state, for_period=None):
|
||||
"""Test if state matches requirements."""
|
||||
"""Test if state matches requirements.
|
||||
|
||||
Async friendly.
|
||||
"""
|
||||
if isinstance(entity, str):
|
||||
entity = hass.states.get(entity)
|
||||
|
||||
@@ -357,7 +360,7 @@ def time_from_config(config, config_validation=True):
|
||||
def zone(hass, zone_ent, entity):
|
||||
"""Test if zone-condition matches.
|
||||
|
||||
Can be run async.
|
||||
Async friendly.
|
||||
"""
|
||||
if isinstance(zone_ent, str):
|
||||
zone_ent = hass.states.get(zone_ent)
|
||||
|
||||
Reference in New Issue
Block a user