Overhaul command_line tests (#46682)

This commit is contained in:
Dermot Duffy
2021-03-01 08:27:04 -08:00
committed by GitHub
parent 3ebd5aff98
commit be8584c0bc
8 changed files with 699 additions and 535 deletions

View File

@@ -144,9 +144,6 @@ class CommandSwitch(SwitchEntity):
def _query_state(self):
"""Query for state."""
if not self._command_state:
_LOGGER.error("No state command specified")
return
if self._value_template:
return self._query_state_value(self._command_state)
return self._query_state_code(self._command_state)