View Source Yeelight.Command (yeelight v0.2.0)

create command and send to device

Yeelight.Command.set_scene_auto_delay_off(1, 5)
|> Yeelight.Command.send_to(device)

Link to this section Summary

Link to this section Types

@type duration() :: non_neg_integer() | nil

Link to this section Functions

Link to this function

adjust_brightness(percentage, duration)

View Source
@spec adjust_brightness(-100..100, non_neg_integer()) :: Yeelight.Message.t()
Link to this function

adjust_color(percentage, duration)

View Source
@spec adjust_color(-100..100, non_neg_integer()) :: Yeelight.Message.t()
Link to this function

adjust_color_temperature(percentage, duration)

View Source
@spec adjust_color_temperature(-100..100, non_neg_integer()) :: Yeelight.Message.t()
Link to this function

build_command(method, params)

View Source
@spec build_command(binary(), list()) :: Yeelight.Message.t()
Link to this function

get_properties(properties)

View Source
@spec get_properties(list()) :: Yeelight.Message.t()
@spec get_timer_job() :: Yeelight.Message.t()
Link to this function

send_to(command, device)

View Source
Link to this function

set_adjust(action, prop)

View Source
@spec set_adjust(atom(), atom()) :: Yeelight.Message.t()
Link to this function

set_bright(brightness, duration \\ nil)

View Source
@spec set_bright(1..100, duration()) :: Yeelight.Message.t()
@spec set_default() :: Yeelight.Message.t()
Link to this function

set_hsv(hue, saturation, duration \\ nil)

View Source
@spec set_hsv(0..359, 0..100, duration()) :: Yeelight.Message.t()
@spec set_music_off() :: Yeelight.Message.t()
Link to this function

set_music_on(host, port)

View Source
@spec set_music_on(String.t(), integer()) :: Yeelight.Message.t()
@spec set_name(binary()) :: Yeelight.Message.t()
Link to this function

set_power_off(duration \\ nil)

View Source
@spec set_power_off(duration()) :: Yeelight.Message.t()
Link to this function

set_power_on(mode, duration \\ nil)

View Source
@spec set_power_on(atom(), duration()) :: Yeelight.Message.t()
Link to this function

set_rgb(rgb, duration \\ nil)

View Source
@spec set_rgb([0..255], duration()) :: Yeelight.Message.t()
@spec set_rgb(0..16_777_215, duration()) :: Yeelight.Message.t()
Link to this function

set_rgb(r, g, b, duration \\ nil)

View Source
@spec set_rgb(0..255, 0..255, 0..255, duration()) :: Yeelight.Message.t()
Link to this function

set_scene_auto_delay_off(time, brightness)

View Source
Link to this function

set_scene_color_flow(count, action, flow_expressions)

View Source
Link to this function

set_scene_hsv(hue, saturation, brightness)

View Source
Link to this function

set_scene_rgb(rgb, brightness)

View Source
Link to this function

set_scene_rgb(r, g, b, brightness)

View Source
Link to this function

set_scene_temperature(temperature, brightness)

View Source
Link to this function

set_temperature(temperature, duration)

View Source
@spec set_temperature(1700..6500, duration()) :: Yeelight.Message.t()
Link to this function

start_color_flow(count, action, flow_expressions)

View Source
@spec start_color_flow(non_neg_integer(), 0..2, [map()]) :: Yeelight.Message.t()
Link to this function

start_timer_job(minutes)

View Source
@spec start_timer_job(integer()) :: Yeelight.Message.t()
@spec stop_color_flow() :: Yeelight.Message.t()
@spec stop_timer_job() :: Yeelight.Message.t()
@spec toggle() :: Yeelight.Message.t()