Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion custom_components/petlibro/date.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def async_setup_entry(

# Ensure that the pets are loaded
if not (pets := hub.pets):
_LOGGER.warning("No pets found in hub during date setup.")
_LOGGER.debug("No pets found in hub during date setup.")

if not (pets): # or devices
return
Expand Down
4 changes: 2 additions & 2 deletions custom_components/petlibro/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async def load_pets(self) -> None:
_LOGGER.error("Error fetching shared pet info.")

if not pet_list:
_LOGGER.warning("No pets found in the API response.")
_LOGGER.debug("No pets found in the API response.")
return # Early return if no pets found

for pet_data in pet_list:
Expand Down Expand Up @@ -243,7 +243,7 @@ async def refresh_data(self) -> bool:
if not self.member:
_LOGGER.warning("No member to refresh.")
if not self.pets:
_LOGGER.warning("No pets to refresh.")
_LOGGER.debug("No pets to refresh.")

now = utcnow()
refresh_tasks, data_objects = [], []
Expand Down
2 changes: 1 addition & 1 deletion custom_components/petlibro/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def async_setup_entry(

# Ensure that the pets are loaded
if not (pets := hub.pets):
_LOGGER.warning("No pets found in hub during image setup.")
_LOGGER.debug("No pets found in hub during image setup.")

if not (pets): # or devices
return
Expand Down
2 changes: 1 addition & 1 deletion custom_components/petlibro/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ async def async_setup_entry(

# Ensure that the pets are loaded
if not (pets := hub.pets):
_LOGGER.warning("No pets found in hub during number setup.")
_LOGGER.debug("No pets found in hub during number setup.")

if not (devices or pets):
return
Expand Down
4 changes: 2 additions & 2 deletions custom_components/petlibro/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ async def async_setup_entry(

# Ensure that the pets are loaded
if not (pets := hub.pets):
_LOGGER.warning("No pets found in hub during select setup.")
_LOGGER.debug("No pets found in hub during select setup.")

if not (devices or pets):
return
Expand Down Expand Up @@ -530,4 +530,4 @@ async def async_setup_entry(

if entities:
# Add select entities to Home Assistant
async_add_entities(entities)
async_add_entities(entities)
4 changes: 2 additions & 2 deletions custom_components/petlibro/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ async def async_setup_entry(
_LOGGER.warning("No devices found in hub during sensor setup.")

if not (pets := hub.pets):
_LOGGER.warning("No pets found in hub during sensor setup.")
_LOGGER.debug("No pets found in hub during sensor setup.")

if not (devices or member or pets):
return
Expand Down Expand Up @@ -1562,4 +1562,4 @@ async def async_setup_entry(
entities.extend(pet.entities(PL_PetSensorEntity, hub))

if entities:
async_add_entities(entities)
async_add_entities(entities)
2 changes: 1 addition & 1 deletion custom_components/petlibro/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ async def async_setup_entry(

# Ensure that the pets are loaded
if not (pets := hub.pets):
_LOGGER.warning("No pets found in hub during switch setup.")
_LOGGER.debug("No pets found in hub during switch setup.")

if not (devices or pets):
return
Expand Down
2 changes: 1 addition & 1 deletion custom_components/petlibro/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def async_setup_entry(
]

if not entities:
_LOGGER.warning("No text entities added, entities list is empty!")
_LOGGER.debug("No text entities added, entities list is empty!")
else:
# Log the text of entities and their details
_LOGGER.debug("Adding %d PetLibro text entities", len(entities))
Expand Down