various esphome changes
This commit is contained in:
@@ -165,8 +165,8 @@ mqtt:
|
||||
topic_prefix: ${mqtt_topic}/${device_name}
|
||||
username: ${mqtt_username}
|
||||
password: ${mqtt_password}
|
||||
discovery: True # enable entity discovery (true is default)
|
||||
discover_ip: True # enable device discovery (true is default)
|
||||
discovery: False # enable entity discovery (true is default)
|
||||
#discover_ip: True # enable device discovery (true is default)
|
||||
|
||||
|
||||
#############################################
|
||||
@@ -291,5 +291,72 @@ light:
|
||||
warm_white: output_ww
|
||||
cold_white_color_temperature: 4800 K
|
||||
warm_white_color_temperature: 2500 K # 2500k is the original value of the lamp. To correct binning for 2700k to look more like 2700k use 2650k instead
|
||||
restore_mode: ALWAYS_ON
|
||||
gamma_correct: 0
|
||||
restore_mode: ALWAYS_OFF
|
||||
gamma_correct: 0
|
||||
|
||||
|
||||
|
||||
|
||||
#globals:
|
||||
# - id: fade_brightness
|
||||
# type: float
|
||||
# initial_value: '0.0'
|
||||
# - id: fade_step
|
||||
# type: float
|
||||
# initial_value: '0.0'
|
||||
|
||||
|
||||
# This script fades the light ON to full brightness over 20 seconds.
|
||||
#script:
|
||||
# - id: fade_on
|
||||
# then:
|
||||
# # First, capture the current brightness.
|
||||
# - lambda: |-
|
||||
# // If the light is off, current brightness will be 0.0.
|
||||
# float current = id(light1).current_values.get_brightness();
|
||||
# id(fade_brightness) = current;
|
||||
# // Compute the step size so that after 100 steps (200ms each) we reach full brightness.
|
||||
# id(fade_step) = (1.0 - current) / 100.0;
|
||||
# - repeat:
|
||||
# count: 100
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# id(fade_brightness) += id(fade_step);
|
||||
# if (id(fade_brightness) > 1.0) {
|
||||
# id(fade_brightness) = 1.0;
|
||||
# }
|
||||
# // Update the light’s brightness.
|
||||
# id(light1).turn_on({ brightness: id(fade_brightness) });
|
||||
# - delay: 200ms
|
||||
|
||||
# This script fades the light OFF over 20 seconds.
|
||||
# - id: fade_off
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# // Capture current brightness (if the light is on).
|
||||
# float current = id(light1).current_values.get_brightness();
|
||||
# id(fade_brightness) = current;
|
||||
# // Compute step size so that after 100 steps we reach 0.
|
||||
# id(fade_step) = current / 100.0;
|
||||
# - repeat:
|
||||
# count: 100
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# id(fade_brightness) -= id(fade_step);
|
||||
# if (id(fade_brightness) < 0.0) {
|
||||
# id(fade_brightness) = 0.0;
|
||||
# }
|
||||
# id(light1).turn_on({ brightness: id(fade_brightness) });
|
||||
# - delay: 200ms
|
||||
# # Finally, ensure the light is turned off.
|
||||
# - lambda: |-
|
||||
# id(light1).turn_off();
|
||||
|
||||
#switch:
|
||||
# - platform: template
|
||||
# name: "Fade on and off"
|
||||
# id: virtual_switch
|
||||
# turn_on_action:
|
||||
# - script.execute: fade_on
|
||||
# turn_off_action:
|
||||
# - script.execute: fade_off
|
Reference in New Issue
Block a user