Skip to content

Commit

Permalink
Add missing state write to home assistant.
Browse files Browse the repository at this point in the history
  • Loading branch information
koenhendriks committed Jan 14, 2024
1 parent 8560726 commit d1ff5fc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/button_plus/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit d1ff5fc

Please sign in to comment.