Demo: Explicitly return None when no extra state attribute set ()

pull/52393/head
Franck Nijhof 2021-07-01 12:43:37 +02:00 committed by GitHub
parent c1c078c3d5
commit 451b976458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
homeassistant/components/demo

View File

@ -53,6 +53,7 @@ class DemoRemote(RemoteEntity):
"""Return device state attributes."""
if self._last_command_sent is not None:
return {"last_command_sent": self._last_command_sent}
return None
def turn_on(self, **kwargs: Any) -> None:
"""Turn the remote on."""