1 """Useful functions for the IHC component."""
5 from ihcsdk.ihccontroller
import IHCController
11 hass: HomeAssistant, ihc_controller: IHCController, ihc_id: int
13 """Send a short on/off pulse to an IHC controller resource."""
15 await asyncio.sleep(0.1)
21 hass: HomeAssistant, ihc_controller: IHCController, ihc_id: int, value: bool
22 ) -> asyncio.Future[bool]:
23 """Set a bool value on an IHC controller resource."""
24 return hass.async_add_executor_job(
25 ihc_controller.set_runtime_value_bool, ihc_id, value
31 hass: HomeAssistant, ihc_controller: IHCController, ihc_id: int, value: int
32 ) -> asyncio.Future[bool]:
33 """Set a int value on an IHC controller resource."""
34 return hass.async_add_executor_job(
35 ihc_controller.set_runtime_value_int, ihc_id, value
41 hass: HomeAssistant, ihc_controller: IHCController, ihc_id: int, value: float
42 ) -> asyncio.Future[bool]:
43 """Set a float value on an IHC controller resource."""
44 return hass.async_add_executor_job(
45 ihc_controller.set_runtime_value_float, ihc_id, value
asyncio.Future[bool] async_set_float(HomeAssistant hass, IHCController ihc_controller, int ihc_id, float value)
None async_pulse(HomeAssistant hass, IHCController ihc_controller, int ihc_id)
asyncio.Future[bool] async_set_int(HomeAssistant hass, IHCController ihc_controller, int ihc_id, int value)
asyncio.Future[bool] async_set_bool(HomeAssistant hass, IHCController ihc_controller, int ihc_id, bool value)