mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
This commit is contained in:
parent
74010fc2df
commit
fe1a85047e
@ -237,7 +237,10 @@ def query_response_sensor(
|
|||||||
def query_response_climate(
|
def query_response_climate(
|
||||||
entity: Entity, config: Config, units: UnitSystem) -> dict:
|
entity: Entity, config: Config, units: UnitSystem) -> dict:
|
||||||
"""Convert a climate entity to a QUERY response."""
|
"""Convert a climate entity to a QUERY response."""
|
||||||
mode = entity.attributes.get(climate.ATTR_OPERATION_MODE).lower()
|
mode = entity.attributes.get(climate.ATTR_OPERATION_MODE)
|
||||||
|
if mode is None:
|
||||||
|
mode = entity.state
|
||||||
|
mode = mode.lower()
|
||||||
if mode not in CLIMATE_SUPPORTED_MODES:
|
if mode not in CLIMATE_SUPPORTED_MODES:
|
||||||
mode = 'heat'
|
mode = 'heat'
|
||||||
attrs = entity.attributes
|
attrs = entity.attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user