MQTT Remove unused and not tested code ()

This commit is contained in:
Jan Bouwhuis 2022-01-20 13:47:46 +01:00 committed by GitHub
parent 04c5e51cbd
commit 8b30751839
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@ from homeassistant.helpers import config_validation as cv, event, template
from homeassistant.helpers.dispatcher import async_dispatcher_connect, dispatcher_send from homeassistant.helpers.dispatcher import async_dispatcher_connect, dispatcher_send
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from homeassistant.helpers.frame import report from homeassistant.helpers.frame import report
from homeassistant.helpers.typing import ConfigType, ServiceDataType, TemplateVarsType from homeassistant.helpers.typing import ConfigType, TemplateVarsType
from homeassistant.loader import bind_hass from homeassistant.loader import bind_hass
from homeassistant.util import dt as dt_util from homeassistant.util import dt as dt_util
from homeassistant.util.async_ import run_callback_threadsafe from homeassistant.util.async_ import run_callback_threadsafe
@ -403,16 +403,6 @@ class MqttServiceInfo(BaseServiceInfo):
return getattr(self, name) return getattr(self, name)
def _build_publish_data(topic: Any, qos: int, retain: bool) -> ServiceDataType:
"""Build the arguments for the publish service without the payload."""
data = {ATTR_TOPIC: topic}
if qos is not None:
data[ATTR_QOS] = qos
if retain is not None:
data[ATTR_RETAIN] = retain
return data
def publish( def publish(
hass: HomeAssistant, hass: HomeAssistant,
topic: str, topic: str,