AutomationConnectIQ-Sample5

Automation Connect IQ SDK

The first half is the same as the code at the beginning here.
Only the subsequent simulator operation part is described here.

# Setting the number of notifications.
$sim.SetNotificationCount(4)

# Setting the number of alarms.
$sim.SetAlarmCount(3)

# Battery information settings
$sim.SetBatteryStatus(20, $false)

# Trigger goal.
$sim.TriggerGoal([Simulator+GoalType]::Steps)
Start-sleep -Seconds 11
$sim.TriggerGoal([Simulator+GoalType]::FloorClimbed)
Start-sleep -Seconds 11
$sim.TriggerGoal([Simulator+GoalType]::ActiveMinutes)
  • Line 8: Battery information settings
    The first parameter sets the charge rate, and the second argument sets True when charging.
  • Lines 11-15: Goal notification
    After the notification, it seems that it takes about 10 seconds to return to the normal watch screen, so it is better to wait 11 seconds with plenty of time.

コメント

Copied title and URL