|
@@ -27,6 +27,7 @@ async def async_setup_entry(
|
|
|
PromoteFromNextButton(coordinator, entry, device_name),
|
|
PromoteFromNextButton(coordinator, entry, device_name),
|
|
|
ClearCurrentButton(coordinator, entry, device_name),
|
|
ClearCurrentButton(coordinator, entry, device_name),
|
|
|
TestNextGuestButton(coordinator, entry, device_name),
|
|
TestNextGuestButton(coordinator, entry, device_name),
|
|
|
|
|
+ GuestArrivedButton(coordinator, entry, device_name),
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
@@ -122,3 +123,25 @@ class TestNextGuestButton(CoordinatorEntity[RoomCalCoordinator], ButtonEntity):
|
|
|
"check_in_time": check_in_dt.time().replace(second=0, microsecond=0),
|
|
"check_in_time": check_in_dt.time().replace(second=0, microsecond=0),
|
|
|
})
|
|
})
|
|
|
await self.coordinator.async_start_override(OverrideData(current=override_current))
|
|
await self.coordinator.async_start_override(OverrideData(current=override_current))
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+class GuestArrivedButton(ButtonEntity):
|
|
|
|
|
+ _attr_has_entity_name = True
|
|
|
|
|
+ _attr_name = "Guest Arrived"
|
|
|
|
|
+ _attr_icon = "mdi:account-arrow-right"
|
|
|
|
|
+
|
|
|
|
|
+ def __init__(
|
|
|
|
|
+ self,
|
|
|
|
|
+ coordinator: RoomCalCoordinator,
|
|
|
|
|
+ entry: ConfigEntry,
|
|
|
|
|
+ device_name: str,
|
|
|
|
|
+ ) -> None:
|
|
|
|
|
+ self._coordinator = coordinator
|
|
|
|
|
+ self._attr_unique_id = f"{entry.entry_id}_guest_arrived"
|
|
|
|
|
+ self._attr_device_info = DeviceInfo(
|
|
|
|
|
+ identifiers={(DOMAIN, f"{entry.entry_id}_room_state")},
|
|
|
|
|
+ name=device_name,
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
|
|
+ async def async_press(self) -> None:
|
|
|
|
|
+ pass
|