1 """Button platform for CoolMasterNet integration."""
3 from __future__
import annotations
11 from .const
import DATA_COORDINATOR, DATA_INFO, DOMAIN
12 from .entity
import CoolmasterEntity
17 config_entry: ConfigEntry,
18 async_add_entities: AddEntitiesCallback,
20 """Set up the CoolMasterNet button platform."""
21 info = hass.data[DOMAIN][config_entry.entry_id][DATA_INFO]
22 coordinator = hass.data[DOMAIN][config_entry.entry_id][DATA_COORDINATOR]
25 for unit_id
in coordinator.data
30 """Reset the clean filter timer (once filter was cleaned)."""
34 translation_key=
"reset_filter",
35 entity_category=EntityCategory.CONFIG,
39 """Press the button."""
40 await self.
_unit_unit.reset_filter()
41 await self.coordinator.async_refresh()