Fix unnecessary-return-none in telnet (#122949)

This commit is contained in:
epenet 2024-07-31 20:21:04 +02:00 committed by GitHub
parent 9db42beade
commit bc25657f0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -144,7 +144,7 @@ class TelnetSwitch(SwitchEntity):
rendered = self._value_template.render_with_possible_json_value(response)
else:
_LOGGER.warning("Empty response for command: %s", self._command_state)
return None
return
self._attr_is_on = rendered == "True"
def turn_on(self, **kwargs: Any) -> None: