public IoBrokerCommunicationService(IIoBrokerDotNet ioBroker, IoBrokerConfig ioBrokerConfig, IAutomaticMode automaticMode) { _ioBrokerConfig = ioBrokerConfig; _ioBroker = ioBroker; _automaticMode = automaticMode; _automaticMode.OneShotPoured += OneShotPouredHandler; }
public ToiletFlusherStateMachine( IFlushService flusherMotor, IManDetectionService manDetection, ILedControl ledControl, IIoBrokerDotNet ioBroker) { _ioBroker = ioBroker; mFlusherMotor = flusherMotor; mManDetection = manDetection; mLedControl = ledControl; mStatus = new ToiletStateMachineStatus(); mManDetection.SomeoneDetectedChanged += SomeoneDetectedChangedHandler; mManDetection.SomeoneIsPeeingChanged += SomeoneIsPeeingChangedHandler; ConfigureStateMachine(); _ioBroker.ConnectAsync(TimeSpan.FromSeconds(5)); }