|
@ -170,10 +170,6 @@ func (c *EventCondition) checkDevice(key string, device Device) (matches bool, s |
|
|
|
|
|
|
|
|
return c.matches(strconv.FormatFloat(device.State.Temperature, 'f', -1, 64)), false |
|
|
return c.matches(strconv.FormatFloat(device.State.Temperature, 'f', -1, 64)), false |
|
|
case "scene": |
|
|
case "scene": |
|
|
if len(device.SceneAssignments) == 0 { |
|
|
|
|
|
return false, false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
sceneId := -1 |
|
|
sceneId := -1 |
|
|
for _, assignment := range device.SceneAssignments { |
|
|
for _, assignment := range device.SceneAssignments { |
|
|
duration := time.Duration(assignment.DurationMS) * time.Millisecond |
|
|
duration := time.Duration(assignment.DurationMS) * time.Millisecond |
|
|