Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions components/wmbus_meter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import automation
from esphome.components.mqtt import (
MQTT_PUBLISH_ACTION_SCHEMA,
MQTTPublishAction,
mqtt_publish_action_to_code,
)
from esphome.components.mqtt import MQTT_PUBLISH_ACTION_SCHEMA
from esphome.components.wmbus_common.drivers.loader import (
AutoDriver,
DriverManager,
Expand Down Expand Up @@ -127,9 +123,11 @@ async def to_code(config):
)


_MQTT_PUBLISH = automation.ACTION_REGISTRY["mqtt.publish"]

automation.register_action(
"wmbus_meter.send_telegram_with_mqtt",
MQTTPublishAction,
_MQTT_PUBLISH.type_id,
TELEGRAM_MQTT_PUBLISH_ACTION_SCHEMA,
synchronous=True,
)(mqtt_publish_action_to_code)
)(_MQTT_PUBLISH.fun)
Loading