class EmuPower::Commands::SetSchedule

Set the notification schedule on the EMU. Note: this only seems to be effective shortly after the unit starts up, while the modes of the schedule are all 'default'. After that, the meter seems to push a schedule configuration and set the mode to 'rest', which overwrites the existing schedule and ignores subsequent SetSchedule commands.

Constants

EVENTS

Public Class Methods

new(event, frequency, enabled) click to toggle source
Calls superclass method EmuPower::Commands::Command::new
# File lib/emu_power/commands.rb, line 142
def initialize(event, frequency, enabled)
        super('set_schedule')
        raise ArgumentError.new("Event must be one of #{EVENTS.join(', ')}") unless EVENTS.include?(event)
        @data[:event] = event
        @data[:frequency] = to_hex(frequency, 4)
        @data[:enabled] = to_yn(enabled)
end