Skip to content

Commit

Permalink
Add a __repr__ for HubitatEventEmitter
Browse files Browse the repository at this point in the history
  • Loading branch information
jason0x43 committed May 25, 2020
1 parent 1c2af49 commit fea7b2f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/hubitat/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ async def update_device_registry(self) -> None:
dreg.async_get_or_create(config_entry_id=entry.entry_id, **self.device_info)
_LOGGER.debug("Created device for %s", self)

def __repr__(self) -> str:
"""Return the representation."""
return f"<HubitatEventEmitter {self.name}>"


def get_hub(hass: HomeAssistant, entry_id: str) -> Hub:
"""Get the Hub device associated with a given config entry."""
Expand Down

0 comments on commit fea7b2f

Please sign in to comment.