Method: TenHsServer::Device.value

Defined in:
lib/ten_hs_server/device.rb

.value(id, value) ⇒ Object

Set device value.

id - An string describing the device value - The value to give the device



160
161
162
163
164
165
166
# File 'lib/ten_hs_server/device.rb', line 160

def value(id, value)
  id = URI::encode(id)
  value = URI::encode(value.to_s)
  response = get "?t=99&f=SetDeviceValue&d=#{id}&a=#{value}"

  parse_set_device_value response.body
end