1 """Obihai button module."""
3 from __future__
import annotations
8 ButtonEntityDescription,
16 from .connectivity
import ObihaiConnection
17 from .const
import DOMAIN, OBIHAI
21 name=f
"{OBIHAI} Reboot",
22 device_class=ButtonDeviceClass.RESTART,
23 entity_category=EntityCategory.CONFIG,
30 async_add_entities: entity_platform.AddEntitiesCallback,
32 """Set up the Obihai sensor entries."""
34 requester: ObihaiConnection = hass.data[DOMAIN][entry.entry_id]
41 """Obihai Reboot button."""
43 entity_description = BUTTON_DESCRIPTION
45 def __init__(self, requester: ObihaiConnection) ->
None:
46 """Initialize monitor sensor."""
54 if not self.
_pyobihai_pyobihai.call_reboot():