Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Schedule can not work ,but the callback was success #43

Open
@YzjAndroid

Description

@YzjAndroid
public static void addGroupTimer(Bridge bridge, LightState lightState, String scheduleName,
                                 String scheduleDesc, TimerScheduleBean timerScheduleBean,
                                 LightPoint lightPoint, final IStateCallBack iStateCallBack) {
    Schedule schedule = new Schedule();
    schedule.setAutoDelete(true);
    schedule.setName(scheduleName);
    schedule.setDescription(scheduleDesc);
    schedule.setStatus(ScheduleStatus.ENABLED);

    ClipActionBuilder clipActionBuilder = new ClipActionBuilder();

// clipActionBuilder.setGroupLightState(groupId, lightState);
clipActionBuilder.updateDeviceState(lightPoint,lightState);
schedule.setClipAction(clipActionBuilder.buildSingle(bridge.getBridgeConfiguration().getVersion()));
// Triggers 1-1-2035 @ 10:05 A.M.
TimePatternBuilder timePatternBuilder = new TimePatternBuilder();
// day month year hour min sec
timePatternBuilder.startAtDate(timerScheduleBean.day, timerScheduleBean.month, timerScheduleBean.year,
timerScheduleBean.hour, timerScheduleBean.minute, timerScheduleBean.second);
schedule.setLocalTime(timePatternBuilder.build());
bridge.updateResource(schedule, BridgeConnectionType.LOCAL, new MyBridgeResponseCallback(iStateCallBack));

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @YzjAndroid

        Issue actions

          Schedule can not work ,but the callback was success · Issue #43 · PhilipsHue/PhilipsHueSDK-Java-MultiPlatform-Android