mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00:00
Indicate to user that remote was turned off when call was attempted (#40715)
* Indicate to user that remote was turned off when call was attempted * Catch exception in test * Switch to warning log * Apply suggestions from code review Add suggested change to loggin
This commit is contained in:
parent
acb0307beb
commit
999eeb39b9
@ -243,6 +243,9 @@ class BroadlinkRemote(RemoteEntity, RestoreEntity):
|
||||
delay = kwargs[ATTR_DELAY_SECS]
|
||||
|
||||
if not self._state:
|
||||
_LOGGER.warning(
|
||||
"remote.send_command canceled: %s entity is turned off", self.entity_id
|
||||
)
|
||||
return
|
||||
|
||||
should_delay = False
|
||||
@ -285,6 +288,9 @@ class BroadlinkRemote(RemoteEntity, RestoreEntity):
|
||||
toggle = kwargs[ATTR_ALTERNATIVE]
|
||||
|
||||
if not self._state:
|
||||
_LOGGER.warning(
|
||||
"remote.learn_command canceled: %s entity is turned off", self.entity_id
|
||||
)
|
||||
return
|
||||
|
||||
should_store = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user