public void AdapterInitialize() { _controller = _mqttAdapterDbService.InitializeAdapter(this); SetupStateMapping(_mqttAdapterDbService.GetStates(_controller)); _messageBroker.SendMessage(new MessageBrokerMessageArgument { Topic = $"{_initializationArguments.CommandPrefix}/{_initializationArguments.Identifier}/power" }); }
void RegisterKnownAdapters() { foreach (var adapter in _mqttAdapterService.ReadConfiguration()) { RegisterAdapter(adapter); } foreach (var adapter in _adapters) { _mqttAdapterDbService.InitializeAdapter(adapter); } }