เงื่อนไข

คำอธิบาย

เงื่อนไขทั่วไปของการทำงานอัตโนมัติ นี่คือโครงสร้างประเภท

ช่องใดช่องหนึ่ง

Type โครงสร้างแบบขยาย
และ AndCondition
device.state.AppSelector AppSelectorState
device.state.ArmDisarm ArmDisarmState
device.state.Brightness BrightnessState
device.state.Channel ChannelState
device.state.ColorSetting ColorSettingState
device.state.Cook CookState
device.state.Dock DockState
device.state.EnergyStorage EnergyStorageState
device.state.FanSpeed FanSpeedState
device.state.Fill FillState
device.state.HumiditySetting HumiditySettingState
device.state.InputSelector InputSelectorState
device.state.LightEffects LightEffectsState
device.state.LockUnlock LockUnlockState
device.state.MediaState MediaStateState
device.state.MotionDetection MotionDetectionState
device.state.OccupancySensing OccupancySensingState
device.state.Online OnlineState
device.state.OnOff OnOffState
device.state.OpenClose OpenCloseState
device.state.Record RecordState
device.state.Rotation RotationState
device.state.RunCycle RunCycleState
device.state.SensorState SensorStateState
device.state.StartStop StartStopState
device.state.TemperatureControl TemperatureControlState
device.state.TemperatureSetting TemperatureSettingState
device.state.Timer TimerState
device.state.Volume VolumeState
home.state.HomePresence ModeState
ไม่ใช่ NotCondition
หรือ OrCondition
time.between TimeBetweenState

ตัวอย่าง

เงื่อนไขง่ายๆ: หากมีคนอยู่บ้าน

condition:
  type: home.state.HomePresence
  state: homePresenceMode
  is: HOME

ใช้เงื่อนไข "และ": หากทีวีเปิดอยู่ "และ" เวลาหลัง 18:00 น.

condition:
  type: and
  conditions:
  - type: device.state.OnOff
    device: TV - Living Room
    state: on
    is: true
  - type: time.between
    after: 6:00 pm