async def async_set_on_time(self, on_time: float) -> None:
        """Set the on time of the light."""
        if isinstance(self._data_point, CustomDpSwitch):
            self._data_point.set_timer_on_time(on_time=on_time)
        if isinstance(self._data_point, DpSwitch):
            await self._data_point.set_on_time(on_time=on_time)
Set the on time of the light.
custom_components/homematicip_local/switch.py