Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
basbruss committed May 23, 2024
1 parent 4652571 commit 13a7628
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/adaptive_cover/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ async def async_check_cover_state_change(
"""Fetch and process state change event."""
_LOGGER.debug("Cover state change")
data = event.data
if data["old_state"] is None:
_LOGGER.debug("Old state is None")
return
self.state_change_data = StateChangedData(
data["entity_id"], data["old_state"], data["new_state"]
)
Expand Down Expand Up @@ -317,6 +320,7 @@ async def async_set_manual_position(self, entity, position):

self.wait_for_target[entity] = True
self.target_call[entity] = position
_LOGGER.debug("Set wait for target %s and target call %s", self.wait_for_target, self.target_call)
await self.hass.services.async_call(COVER_DOMAIN, service, service_data)
_LOGGER.debug("Run %s with data %s", service, service_data)

Expand Down

0 comments on commit 13a7628

Please sign in to comment.