ha(H3): ниты повторного ревью — пустой диапазон, merge значений, чистка
- R1: config flow отклоняет пустое пересечение override и таблицы (достижимый диапазон), + тест - R2: async_sync_now перечитывает снимок без await (события не затираются) - R3: translation_key климата убран (FglairEntity принимает None) - R4: caps==0 «не сообщено» покрыт тестом - R5: SWING_HORIZONTAL_MODES удалён (общий SWING_MODES)
This commit is contained in:
@@ -296,3 +296,23 @@ async def test_manual_conversion_applied(
|
||||
)
|
||||
assert proc.wait_line("CMD SET adjust_temperature=245", 10)
|
||||
assert await hass.config_entries.async_unload(entry.entry_id)
|
||||
|
||||
|
||||
async def test_capabilities_zero_is_unknown(
|
||||
hass: HomeAssistant, mock_ac, socket_enabled
|
||||
):
|
||||
"""device_capabilities=0 трактуем как «не сообщено» — режимы не режем."""
|
||||
proc = mock_ac([
|
||||
"--set", "operation_mode=6",
|
||||
"--set", "device_capabilities=0",
|
||||
])
|
||||
entry = await _setup_entry(hass, proc.port)
|
||||
runtime = entry.runtime_data
|
||||
await _wait_for(lambda: runtime.client.state == State.ONLINE)
|
||||
climate_id = _entity_id(hass, "climate", f"{DSN}_climate")
|
||||
await _wait_for(
|
||||
lambda: climate_id and hass.states.get(climate_id) is not None
|
||||
and hass.states.get(climate_id).state == "heat"
|
||||
)
|
||||
assert "heat" in hass.states.get(climate_id).attributes["hvac_modes"]
|
||||
assert await hass.config_entries.async_unload(entry.entry_id)
|
||||
|
||||
Reference in New Issue
Block a user