From 72c1273d25b498149bc9bbe48cd4edf47e799b2b Mon Sep 17 00:00:00 2001 From: G Johansson Date: Fri, 16 Jun 2023 09:08:51 +0200 Subject: [PATCH] Fix Command Line update twice issue (#94672) Command Line update twice issue --- homeassistant/components/command_line/cover.py | 2 +- homeassistant/components/command_line/switch.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/command_line/cover.py b/homeassistant/components/command_line/cover.py index ebbc8a9b30b..90bc5b7d50e 100644 --- a/homeassistant/components/command_line/cover.py +++ b/homeassistant/components/command_line/cover.py @@ -222,7 +222,7 @@ class CommandCover(ManualTriggerEntity, CoverEntity): if payload: self._state = int(payload) self._process_manual_data(payload) - await self.async_update_ha_state(True) + self.async_write_ha_state() async def async_update(self) -> None: """Update the entity. diff --git a/homeassistant/components/command_line/switch.py b/homeassistant/components/command_line/switch.py index 4a33d8072d7..5beb06eea9d 100644 --- a/homeassistant/components/command_line/switch.py +++ b/homeassistant/components/command_line/switch.py @@ -238,7 +238,7 @@ class CommandSwitch(ManualTriggerEntity, SwitchEntity): if payload or value: self._attr_is_on = (value or payload).lower() == "true" self._process_manual_data(payload) - await self.async_update_ha_state(True) + self.async_write_ha_state() async def async_update(self) -> None: """Update the entity.