28 lines
872 B
C#
28 lines
872 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using BlubbFish.Utils.IoT.Connector;
|
|
using BlubbFish.Utils.IoT.Sensor;
|
|
|
|
namespace IoTBot.Condition {
|
|
class Trigger : ACondition {
|
|
public Trigger(String name, Dictionary<String, String> settings, ASensor sensor, ADataBackend data, AUserBackend user) : base(name, settings, sensor, data, user) { }
|
|
|
|
protected override void Data_Update(Object sender, MqttEventArgs e) {
|
|
//throw new NotImplementedException();
|
|
}
|
|
|
|
protected override void Sensor_Update(Object sender, EventArgs e) {
|
|
//throw new NotImplementedException();
|
|
}
|
|
|
|
protected override void User_Update(Object sender, UserMessageEventArgs e) {
|
|
if (e.Message == this.settings["trigger"]) {
|
|
this.Send();
|
|
}
|
|
}
|
|
}
|
|
}
|