Merge branch 'current' of https://github.com/OttoWinter/esphomedocs into current

This commit is contained in:
Otto Winter 2019-01-18 14:26:56 +01:00
commit aa284e57f8
No known key found for this signature in database
GPG Key ID: DB66C0BE6013F97E
3 changed files with 24 additions and 5 deletions

View File

@ -278,15 +278,19 @@ This effect allows you to write completely custom light effects yourself using :
update_interval: 1s
lambda: |-
static int state = 0;
auto call = id(my_light).turn_on();
// Transtion of 1000ms = 1s
call.set_transition_length(1000);
if (state == 0) {
id(my_light).start_transition(light::LightColorValues::from_rgb(1.0, 1.0, 1.0)));
call.set_rgb(1.0, 1.0, 1.0);
} else if (state == 1) {
id(my_light).start_transition(light::LightColorValues::from_rgb(1.0, 0.0, 1.0)));
call.set_rgb(1.0, 0.0, 1.0);
} else if (state == 2) {
id(my_light).start_transition(light::LightColorValues::from_rgb(0.0, 0.0, 1.0)));
call.set_rgb(0.0, 0.0, 1.0);
} else {
id(my_light).start_transition(light::LightColorValues::from_rgb(0.0, 0.0, 0.0)));
call.set_rgb(1.0, 0.0, 0.0);
}
call.execute();
state += 1;
if (state == 4)
state = 0;

View File

@ -49,6 +49,21 @@ Configuration variables:
to ``3232`` for the ESP32 and ``8266`` for the ESP8266.
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
Updating the password:
----------------------
Since the password is used both for compiling and uploading the regular ``esphomeyaml <file> run`` won't work of course. This issue can be worked around by executing the operations separately through a ``on_boot`` trigger:
.. code-block:: yaml
esphomeyaml:
on_boot:
- lambda: |-
id(ota).set_auth_password("New password");
ota:
password: "Old password"
id: ota
.. note::
If you get errors like

View File

@ -21,7 +21,7 @@ successor of the ESP8266, the ESP32, and its :doc:`ESP32 LEDC PWM <ledc>` instea
- platform: esp8266_pwm
pin: D1
frequency: 1000 Hz
id: pwm-output
id: pwm_output
Configuration variables:
------------------------