Compare commits

..

6 Commits

Author SHA1 Message Date
Ludovic BOUÉ
c8462666cb Update python-roborock to 4.26.3 2026-03-22 10:28:18 +01:00
Sean O'Keeffe
d67caec5c1 Add additional miele oven programs (#166100) 2026-03-22 09:04:07 +01:00
J. Nick Koston
8286014ae1 Bump habluetooth to 5.11.1 (#166161) 2026-03-21 18:22:53 -10:00
J. Nick Koston
1ff8d2279a Bump oralb-ble to 1.1.0 (#166165) 2026-03-21 18:22:21 -10:00
Ludovic BOUÉ
5dcbc1d5d9 feat(roborock): Add Q10 empty dustbin button entity (#166149) 2026-03-22 00:36:43 +01:00
Ludovic BOUÉ
3068653cc7 Update python-roborock to 4.26.2 (#166152) 2026-03-21 23:44:02 +01:00
15 changed files with 196 additions and 23 deletions

View File

@@ -21,6 +21,6 @@
"bluetooth-auto-recovery==1.5.3",
"bluetooth-data-tools==1.28.4",
"dbus-fast==3.1.2",
"habluetooth==5.10.2"
"habluetooth==5.11.1"
]
}

View File

@@ -617,8 +617,10 @@ class OvenProgramId(MieleEnum, missing_to_none=True):
pyrolytic = 323
descale = 326
evaporate_water = 327
rinse = 333
shabbat_program = 335
yom_tov = 336
hydroclean = 341
drying = 357, 2028
heat_crockery = 358
prove_dough = 359, 2023
@@ -723,7 +725,7 @@ class OvenProgramId(MieleEnum, missing_to_none=True):
belgian_sponge_cake = 624
goose_unstuffed = 625
rack_of_lamb_with_vegetables = 634
yorkshire_pudding = 635
yorkshire_pudding = 635, 2352
meat_loaf = 636
defrost_meat = 647
defrost_vegetables = 654
@@ -1123,7 +1125,7 @@ class OvenProgramId(MieleEnum, missing_to_none=True):
wholegrain_rice = 3376
parboiled_rice_steam_cooking = 3380
parboiled_rice_rapid_steam_cooking = 3381
basmati_rice_steam_cooking = 3383
basmati_rice_steam_cooking = 3382, 3383
basmati_rice_rapid_steam_cooking = 3384
jasmine_rice_steam_cooking = 3386
jasmine_rice_rapid_steam_cooking = 3387
@@ -1131,7 +1133,7 @@ class OvenProgramId(MieleEnum, missing_to_none=True):
huanghuanian_rapid_steam_cooking = 3390
simiao_steam_cooking = 3392
simiao_rapid_steam_cooking = 3393
long_grain_rice_general_steam_cooking = 3395
long_grain_rice_general_steam_cooking = 3394, 3395
long_grain_rice_general_rapid_steam_cooking = 3396
chongming_steam_cooking = 3398
chongming_rapid_steam_cooking = 3399

View File

@@ -560,6 +560,7 @@
"hot_water": "Hot water",
"huanghuanian_rapid_steam_cooking": "Huanghuanian (rapid steam cooking)",
"huanghuanian_steam_cooking": "Huanghuanian (steam cooking)",
"hydroclean": "HydroClean",
"hygiene": "Hygiene",
"intensive": "Intensive",
"intensive_bake": "Intensive bake",

View File

@@ -13,5 +13,5 @@
"integration_type": "device",
"iot_class": "local_push",
"loggers": ["oralb_ble"],
"requirements": ["oralb-ble==1.0.2"]
"requirements": ["oralb-ble==1.1.0"]
}

View File

@@ -20,12 +20,18 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import DOMAIN
from .coordinator import (
RoborockB01Q10UpdateCoordinator,
RoborockConfigEntry,
RoborockDataUpdateCoordinator,
RoborockDataUpdateCoordinatorA01,
RoborockWashingMachineUpdateCoordinator,
)
from .entity import RoborockCoordinatedEntityA01, RoborockEntity, RoborockEntityV1
from .entity import (
RoborockCoordinatedEntityA01,
RoborockCoordinatedEntityB01Q10,
RoborockEntity,
RoborockEntityV1,
)
_LOGGER = logging.getLogger(__name__)
@@ -97,6 +103,14 @@ ZEO_BUTTON_DESCRIPTIONS = [
]
Q10_BUTTON_DESCRIPTIONS = [
ButtonEntityDescription(
key="empty_dustbin",
translation_key="empty_dustbin",
),
]
async def async_setup_entry(
hass: HomeAssistant,
config_entry: RoborockConfigEntry,
@@ -139,6 +153,15 @@ async def async_setup_entry(
if isinstance(coordinator, RoborockWashingMachineUpdateCoordinator)
for description in ZEO_BUTTON_DESCRIPTIONS
),
(
RoborockQ10EmptyDustbinButtonEntity(
coordinator,
description,
)
for coordinator in config_entry.runtime_data.b01_q10
if isinstance(coordinator, RoborockB01Q10UpdateCoordinator)
for description in Q10_BUTTON_DESCRIPTIONS
),
)
)
@@ -233,3 +256,37 @@ class RoborockButtonEntityA01(RoborockCoordinatedEntityA01, ButtonEntity):
) from err
finally:
await self.coordinator.async_request_refresh()
class RoborockQ10EmptyDustbinButtonEntity(
RoborockCoordinatedEntityB01Q10, ButtonEntity
):
"""A class to define Q10 empty dustbin button entity."""
entity_description: ButtonEntityDescription
coordinator: RoborockB01Q10UpdateCoordinator
def __init__(
self,
coordinator: RoborockB01Q10UpdateCoordinator,
entity_description: ButtonEntityDescription,
) -> None:
"""Create a Q10 empty dustbin button entity."""
self.entity_description = entity_description
super().__init__(
f"{entity_description.key}_{coordinator.duid_slug}",
coordinator,
)
async def async_press(self, **kwargs: Any) -> None:
"""Press the button to empty dustbin."""
try:
await self.coordinator.api.vacuum.empty_dustbin()
except RoborockException as err:
raise HomeAssistantError(
translation_domain=DOMAIN,
translation_key="command_failed",
translation_placeholders={
"command": "empty_dustbin",
},
) from err

View File

@@ -20,7 +20,7 @@
"loggers": ["roborock"],
"quality_scale": "silver",
"requirements": [
"python-roborock==4.26.2",
"python-roborock==4.26.3",
"vacuum-map-parser-roborock==0.1.4"
]
}

View File

@@ -84,6 +84,9 @@
}
},
"button": {
"empty_dustbin": {
"name": "Empty dustbin"
},
"pause": {
"name": "Pause"
},

View File

@@ -35,7 +35,7 @@ file-read-backwards==2.0.0
fnv-hash-fast==2.0.0
go2rtc-client==0.4.0
ha-ffmpeg==3.2.2
habluetooth==5.10.2
habluetooth==5.11.1
hass-nabucasa==2.0.0
hassil==3.5.0
home-assistant-bluetooth==1.13.1

6
requirements_all.txt generated
View File

@@ -1176,7 +1176,7 @@ ha-silabs-firmware-client==0.3.0
habiticalib==0.4.6
# homeassistant.components.bluetooth
habluetooth==5.10.2
habluetooth==5.11.1
# homeassistant.components.hanna
hanna-cloud==0.0.7
@@ -1732,7 +1732,7 @@ openwrt-ubus-rpc==0.0.2
opower==0.17.1
# homeassistant.components.oralb
oralb-ble==1.0.2
oralb-ble==1.1.0
# homeassistant.components.oru
oru==0.1.11
@@ -2660,7 +2660,7 @@ python-rabbitair==0.0.8
python-ripple-api==0.0.3
# homeassistant.components.roborock
python-roborock==4.26.2
python-roborock==4.26.3
# homeassistant.components.smarttub
python-smarttub==0.0.47

View File

@@ -1046,7 +1046,7 @@ ha-silabs-firmware-client==0.3.0
habiticalib==0.4.6
# homeassistant.components.bluetooth
habluetooth==5.10.2
habluetooth==5.11.1
# homeassistant.components.hanna
hanna-cloud==0.0.7
@@ -1509,7 +1509,7 @@ openwebifpy==4.3.1
opower==0.17.1
# homeassistant.components.oralb
oralb-ble==1.0.2
oralb-ble==1.1.0
# homeassistant.components.orvibo
orvibo==1.1.2
@@ -2256,7 +2256,7 @@ python-pooldose==0.8.6
python-rabbitair==0.0.8
# homeassistant.components.roborock
python-roborock==4.26.2
python-roborock==4.26.3
# homeassistant.components.smarttub
python-smarttub==0.0.47

View File

@@ -5474,6 +5474,7 @@
'hens_eggs_size_xl_soft',
'huanghuanian_rapid_steam_cooking',
'huanghuanian_steam_cooking',
'hydroclean',
'intensive_bake',
'iridescent_shark_fillet',
'jasmine_rice_rapid_steam_cooking',
@@ -5675,6 +5676,7 @@
'rhubarb_chunks',
'rice_pudding_rapid_steam_cooking',
'rice_pudding_steam_cooking',
'rinse',
'risotto',
'roast_beef_low_temperature_cooking',
'roast_beef_roast',
@@ -6085,6 +6087,7 @@
'hens_eggs_size_xl_soft',
'huanghuanian_rapid_steam_cooking',
'huanghuanian_steam_cooking',
'hydroclean',
'intensive_bake',
'iridescent_shark_fillet',
'jasmine_rice_rapid_steam_cooking',
@@ -6286,6 +6289,7 @@
'rhubarb_chunks',
'rice_pudding_rapid_steam_cooking',
'rice_pudding_steam_cooking',
'rinse',
'risotto',
'roast_beef_low_temperature_cooking',
'roast_beef_roast',
@@ -9268,6 +9272,7 @@
'hens_eggs_size_xl_soft',
'huanghuanian_rapid_steam_cooking',
'huanghuanian_steam_cooking',
'hydroclean',
'intensive_bake',
'iridescent_shark_fillet',
'jasmine_rice_rapid_steam_cooking',
@@ -9469,6 +9474,7 @@
'rhubarb_chunks',
'rice_pudding_rapid_steam_cooking',
'rice_pudding_steam_cooking',
'rinse',
'risotto',
'roast_beef_low_temperature_cooking',
'roast_beef_roast',
@@ -9879,6 +9885,7 @@
'hens_eggs_size_xl_soft',
'huanghuanian_rapid_steam_cooking',
'huanghuanian_steam_cooking',
'hydroclean',
'intensive_bake',
'iridescent_shark_fillet',
'jasmine_rice_rapid_steam_cooking',
@@ -10080,6 +10087,7 @@
'rhubarb_chunks',
'rice_pudding_rapid_steam_cooking',
'rice_pudding_steam_cooking',
'rinse',
'risotto',
'roast_beef_low_temperature_cooking',
'roast_beef_roast',

View File

@@ -26,7 +26,7 @@ async def test_async_step_bluetooth_valid_device(hass: HomeAssistant) -> None:
result["flow_id"], user_input={}
)
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == "Smart Series 7000 48BE"
assert result2["title"] == "Triumph D36 48BE"
assert result2["data"] == {}
assert result2["result"].unique_id == "78:DB:2F:C2:48:BE"
@@ -91,7 +91,7 @@ async def test_async_step_user_with_found_devices(hass: HomeAssistant) -> None:
user_input={"address": "78:DB:2F:C2:48:BE"},
)
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == "Smart Series 7000 48BE"
assert result2["title"] == "Triumph D36 48BE"
assert result2["data"] == {}
assert result2["result"].unique_id == "78:DB:2F:C2:48:BE"
@@ -121,7 +121,7 @@ async def test_async_step_user_replace_ignored(hass: HomeAssistant) -> None:
user_input={"address": "78:DB:2F:C2:48:BE"},
)
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == "Smart Series 7000 48BE"
assert result2["title"] == "Triumph D36 48BE"
assert result2["data"] == {}
assert result2["result"].unique_id == "78:DB:2F:C2:48:BE"
@@ -240,7 +240,7 @@ async def test_async_step_user_takes_precedence_over_discovery(
user_input={"address": "78:DB:2F:C2:48:BE"},
)
assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == "Smart Series 7000 48BE"
assert result2["title"] == "Triumph D36 48BE"
assert result2["data"] == {}
assert result2["result"].unique_id == "78:DB:2F:C2:48:BE"

View File

@@ -47,10 +47,10 @@ async def test_sensors(hass: HomeAssistant) -> None:
await hass.async_block_till_done()
assert len(hass.states.async_all("sensor")) == 9
toothbrush_sensor = hass.states.get("sensor.smart_series_7000_48be")
toothbrush_sensor = hass.states.get("sensor.triumph_d36_48be")
toothbrush_sensor_attrs = toothbrush_sensor.attributes
assert toothbrush_sensor.state == "running"
assert toothbrush_sensor_attrs[ATTR_FRIENDLY_NAME] == "Smart Series 7000 48BE"
assert toothbrush_sensor_attrs[ATTR_FRIENDLY_NAME] == "Triumph D36 48BE"
assert ATTR_ASSUMED_STATE not in toothbrush_sensor_attrs
assert await hass.config_entries.async_unload(entry.entry_id)
@@ -76,7 +76,7 @@ async def test_sensors(hass: HomeAssistant) -> None:
await hass.async_block_till_done()
# All of these devices are sleepy so we should still be available
toothbrush_sensor = hass.states.get("sensor.smart_series_7000_48be")
toothbrush_sensor = hass.states.get("sensor.triumph_d36_48be")
assert toothbrush_sensor.state == "running"
@@ -155,9 +155,9 @@ async def test_sensors_battery(hass: HomeAssistant) -> None:
await hass.async_block_till_done()
assert len(hass.states.async_all()) == 7
bat_sensor = hass.states.get("sensor.io_series_6_7_1dcf_battery")
bat_sensor = hass.states.get("sensor.io_series_1dcf_battery")
assert bat_sensor.state == "49"
assert bat_sensor.name == "IO Series 6/7 1DCF Battery"
assert bat_sensor.name == "IO Series 1DCF Battery"
assert await hass.config_entries.async_unload(entry.entry_id)
await hass.async_block_till_done()

View File

@@ -1,4 +1,54 @@
# serializer version: 1
# name: test_buttons[button.roborock_q10_s5_empty_dustbin-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.roborock_q10_s5_empty_dustbin',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Empty dustbin',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Empty dustbin',
'platform': 'roborock',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'empty_dustbin',
'unique_id': 'empty_dustbin_q10_duid',
'unit_of_measurement': None,
})
# ---
# name: test_buttons[button.roborock_q10_s5_empty_dustbin-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Roborock Q10 S5+ Empty dustbin',
}),
'context': <ANY>,
'entity_id': 'button.roborock_q10_s5_empty_dustbin',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_buttons[button.roborock_s7_2_reset_air_filter_consumable-entry]
EntityRegistryEntrySnapshot({
'aliases': list([

View File

@@ -272,3 +272,55 @@ async def test_press_a01_button_failure(
washing_machine.zeo.set_value.assert_called_once()
assert hass.states.get(entity_id).state == "2023-10-30T08:50:00+00:00"
@pytest.mark.freeze_time("2023-10-30 08:50:00")
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
async def test_press_q10_empty_dustbin_button_success(
hass: HomeAssistant,
bypass_api_client_fixture: None,
setup_entry: MockConfigEntry,
fake_q10_vacuum: FakeDevice,
) -> None:
"""Test pressing Q10 empty dustbin button entity."""
entity_id = "button.roborock_q10_s5_empty_dustbin"
assert hass.states.get(entity_id) is not None
await hass.services.async_call(
"button",
SERVICE_PRESS,
blocking=True,
target={"entity_id": entity_id},
)
assert fake_q10_vacuum.b01_q10_properties is not None
fake_q10_vacuum.b01_q10_properties.vacuum.empty_dustbin.assert_called_once()
assert hass.states.get(entity_id).state == "2023-10-30T08:50:00+00:00"
@pytest.mark.freeze_time("2023-10-30 08:50:00")
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
async def test_press_q10_empty_dustbin_button_failure(
hass: HomeAssistant,
bypass_api_client_fixture: None,
setup_entry: MockConfigEntry,
fake_q10_vacuum: FakeDevice,
) -> None:
"""Test failure while pressing Q10 empty dustbin button entity."""
entity_id = "button.roborock_q10_s5_empty_dustbin"
assert fake_q10_vacuum.b01_q10_properties is not None
fake_q10_vacuum.b01_q10_properties.vacuum.empty_dustbin.side_effect = (
RoborockException
)
assert hass.states.get(entity_id) is not None
with pytest.raises(HomeAssistantError, match="Error while calling empty_dustbin"):
await hass.services.async_call(
"button",
SERVICE_PRESS,
blocking=True,
target={"entity_id": entity_id},
)
fake_q10_vacuum.b01_q10_properties.vacuum.empty_dustbin.assert_called_once()
assert hass.states.get(entity_id).state == "2023-10-30T08:50:00+00:00"