Class: Wizrb::Lighting::Events::SetBrightnessEvent

Inherits:
Shared::Events::Base show all
Defined in:
lib/wizrb/lighting/events/set_brightness_event.rb

Constant Summary collapse

MIN_VALUE =
10
MAX_VALUE =
100

Instance Attribute Summary

Attributes inherited from Shared::Events::Base

#params

Instance Method Summary collapse

Methods inherited from Shared::Events::Base

#to_json

Constructor Details

#initialize(value) ⇒ SetBrightnessEvent



12
13
14
15
# File 'lib/wizrb/lighting/events/set_brightness_event.rb', line 12

def initialize(value)
  validate!(value)
  super(method: "setState", params: {dimming: value.to_i})
end