net-daemon/docs

MQTT Triggers

Closed this issue · 1 comments

In the land of HA, MQTT is rather popular. In HA automations, MQTT triggers are done via the MQTT trigger type or the device trigger type. It appears, MQTT events aren't ever published on the HA event bus, so code like the following wouldn't see it:

ha.Events
  .Where(x => x.EventType != "state_changed")
  .Subscribe(e => { Console.WriteLine(JsonSerializer.Serialize(e)); });

Is there another way to response to MQTT events, if not, would this be a good addition to JoySoftware.NetDaemon.Extensions.Mqtt package, since an implementation would likely just read from MQTT as is done by AppDaemon?

Wrong repo.