Rename create_api_object to be private (#90187)
This commit is contained in:
parent
1224b1aff6
commit
34324c98de
1 changed files with 3 additions and 3 deletions
|
@ -175,7 +175,7 @@ class Control4Light(Control4Entity, LightEntity):
|
|||
self._attr_color_mode = ColorMode.ONOFF
|
||||
self._attr_supported_color_modes = {ColorMode.ONOFF}
|
||||
|
||||
def create_api_object(self):
|
||||
def _create_api_object(self):
|
||||
"""Create a pyControl4 device object.
|
||||
|
||||
This exists so the director token used is always the latest one, without needing to re-init the entire entity.
|
||||
|
@ -203,7 +203,7 @@ class Control4Light(Control4Entity, LightEntity):
|
|||
|
||||
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||
"""Turn the entity on."""
|
||||
c4_light = self.create_api_object()
|
||||
c4_light = self._create_api_object()
|
||||
if self._is_dimmer:
|
||||
if ATTR_TRANSITION in kwargs:
|
||||
transition_length = kwargs[ATTR_TRANSITION] * 1000
|
||||
|
@ -226,7 +226,7 @@ class Control4Light(Control4Entity, LightEntity):
|
|||
|
||||
async def async_turn_off(self, **kwargs: Any) -> None:
|
||||
"""Turn the entity off."""
|
||||
c4_light = self.create_api_object()
|
||||
c4_light = self._create_api_object()
|
||||
if self._is_dimmer:
|
||||
if ATTR_TRANSITION in kwargs:
|
||||
transition_length = kwargs[ATTR_TRANSITION] * 1000
|
||||
|
|
Loading…
Add table
Reference in a new issue