public IEnumerable <Condition> FilterBySensor(Socket socket, string sensorName)
        {
            var modes          = _stateStore.GetModes();
            var activeModes    = modes.Where(x => x.IsActive).Select(x => x.Name);
            var physicalStates = _stateStore.GetPhysicalStates();
            var sensorStates   = _stateStore.GetSensorStates(socket);

            var trueConditions = _conditions
                                 .Where(x => x.Socket.Equals(socket))
                                 .Where(x => activeModes.Contains(x.Mode) || string.IsNullOrEmpty(x.Mode))
                                 .Where(x => x.Text.Contains(sensorName))
                                 .Where(x => x.IsTrue(physicalStates, sensorStates))
                                 .ToList();

            return(trueConditions);
        }