def publish_template(opp: OpenPeerPower, topic, payload_template, qos=None, retain=None) -> None: """Publish message to an MQTT topic.""" opp.add_job(async_publish_template, opp, topic, payload_template, qos, retain)
def load_platform( opp: core.OpenPeerPower, component: str, platform: str, discovered: DiscoveryInfoType, opp_config: ConfigType, ) -> None: """Load a component and platform dynamically.""" opp.add_job( async_load_platform( # type: ignore opp, component, platform, discovered, opp_config))
def discover( opp: core.OpenPeerPower, service: str, discovered: DiscoveryInfoType, component: str, opp_config: ConfigType, ) -> None: """Fire discovery event. Can ensure a component is loaded.""" opp.add_job( async_discover(opp, service, discovered, component, opp_config) # type: ignore )