mirror of
https://bitbucket.org/myhomie/mycorerepository.git
synced 2025-12-06 17:51:20 +00:00
45 lines
795 B
C#
45 lines
795 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MyCore.Models
|
|
{
|
|
public class Automation
|
|
{
|
|
public string Id { get; set; }
|
|
public string Name { get; set; }
|
|
public List<Declencheur> Declencheurs { get; set; }
|
|
public List<Condition> Conditions { get; set; }
|
|
public List<Action> Actions { get; set; }
|
|
}
|
|
|
|
public class Declencheur
|
|
{
|
|
public enum Type
|
|
{
|
|
MQTT,
|
|
WEB,
|
|
TIME
|
|
}
|
|
}
|
|
|
|
public class Condition
|
|
{
|
|
public enum Type
|
|
{
|
|
STATE,
|
|
HOUR
|
|
}
|
|
}
|
|
|
|
public class Action
|
|
{
|
|
public enum Type
|
|
{
|
|
DELAY,
|
|
DEVICE
|
|
}
|
|
}
|
|
}
|