Make MQTT number respect retain setting (#47270)

This commit is contained in:
Erik Montnemery 2021-03-02 14:28:31 +01:00 committed by GitHub
parent 027d125617
commit 959181a2e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,7 @@ from . import (
subscription, subscription,
) )
from .. import mqtt from .. import mqtt
from .const import CONF_RETAIN
from .debug_info import log_messages from .debug_info import log_messages
from .mixins import ( from .mixins import (
MQTT_AVAILABILITY_SCHEMA, MQTT_AVAILABILITY_SCHEMA,
@ -161,6 +162,7 @@ class MqttNumber(MqttEntity, NumberEntity, RestoreEntity):
self._config[CONF_COMMAND_TOPIC], self._config[CONF_COMMAND_TOPIC],
current_number, current_number,
self._config[CONF_QOS], self._config[CONF_QOS],
self._config[CONF_RETAIN],
) )
@property @property