private void DispatchGpioStateChangedEvent(string gpioHostId, int gpioId, GpioState oldState, GpioState newState) { var properties = new WirehomeDictionary { ["type"] = "gpio_registry.event.state_changed", ["gpio_host_id"] = gpioHostId, ["gpio_id"] = gpioId, ["old_state"] = oldState.ToString().ToLowerInvariant(), ["new_state"] = newState.ToString().ToLowerInvariant() }; _messageBusService.Publish(properties); }