API Reference yeelight v0.2.0
modules
Modules
Documentation for Yeelight.
create command and send to device
start the discovery server and get the device list
color_flow = [
%Yeelight.FlowExpression.ColorTemperature{
duration: 1000,
temperature: 6500,
brightness: 100
},
%Yeelight.FlowExpression.ColorTemperature{
duration: 1000,
temperature: 1800,
brightness: 100
}
]
Yeelight.Command.start_color_flow(6, 0, color_flow)
|> Yeelight.Command.send_to(hd(devices))
color_flow = [
%Yeelight.FlowExpression.RGB{
duration: 1000,
r: 255,
brightness: 100
},
%Yeelight.FlowExpression.RGB{
duration: 1000,
g: 255,
brightness: 100
},
%Yeelight.FlowExpression.RGB{
duration: 1000,
b: 255,
brightness: 100
]
Yeelight.Command.start_color_flow(6, 0, color_flow)
|> Yeelight.Command.send_to(hd(devices))
color_flow = [
%Yeelight.FlowExpression.Sleep{
duration: 1000
}
]
Yeelight.Command.start_color_flow(6, 0, color_flow)
|> Yeelight.Command.send_to(hd(devices))
If the command is sucessfull the result pair will have the value "ok" or the value of properties for methods get_xx Example => {"id": 1, "result": "ok"}