From d1ff5fc02575ddedd15bb13314a38d4fdc5ab035 Mon Sep 17 00:00:00 2001 From: Koen Hendriks Date: Sun, 14 Jan 2024 20:57:46 +0100 Subject: [PATCH] Add missing state write to home assistant. --- custom_components/button_plus/text.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/button_plus/text.py b/custom_components/button_plus/text.py index 5f29272..bff67d1 100644 --- a/custom_components/button_plus/text.py +++ b/custom_components/button_plus/text.py @@ -4,6 +4,7 @@ import logging from homeassistant.components.text import TextEntity + from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant from homeassistant.components.mqtt import client as mqtt @@ -102,6 +103,7 @@ async def async_set_value(self, value: str) -> None: _LOGGER.debug(f"ButtonPlus label update to {label_topic} with new value: {value}") await mqtt.async_publish(hass=self.hass, topic=label_topic, payload=value, qos=0, retain=True) self._attr_native_value = value + self.async_write_ha_state() class ButtonPlusLabel(ButtonPlusText):