Fix formatting and naming in rack3.

This commit is contained in:
2021-11-28 14:56:31 -08:00
parent 4690e12209
commit b30e0cc877

View File

@@ -6,9 +6,9 @@ substitutions:
amppwr_name: "Denon Pwr" amppwr_name: "Denon Pwr"
dallas_pin: GPIO32 dallas_pin: GPIO32
dallas_in_addr: "0x7F0114328974D728" dallas_in_addr: "0x7F0114328974D728"
dallas_in_name: rack_3_temp_in dallas_in_name: Rack 3 Temp In
dallas_out_addr: "0xB801143296ED7B28" dallas_out_addr: "0xB801143296ED7B28"
dallas_out_name: rack_3_temp_out dallas_out_name: Rack 3 Temp Out
esphome: esphome:
name: rack_3 name: rack_3
@@ -32,16 +32,16 @@ wifi:
captive_portal: captive_portal:
output: output:
- platform: ledc - platform: ledc
pin: ${duct_fan_pin} pin: ${duct_fan_pin}
id: duct_fan_output_id id: duct_fan_output_id
frequency: ${duct_fan_pwmfreq} frequency: ${duct_fan_pwmfreq}
fan: fan:
- platform: speed - platform: speed
id: duct_fan_spd_id id: duct_fan_spd_id
output: duct_fan_output_id output: duct_fan_output_id
name: ${duct_fan_spd_name} name: ${duct_fan_spd_name}
dallas: dallas:
- pin: - pin:
@@ -51,12 +51,12 @@ dallas:
sensor: sensor:
- platform: dallas - platform: dallas
address: ${dallas_in_addr} address: ${dallas_in_addr}
name: ${dallas_in_name} name: ${dallas_in_name}
- platform: dallas - platform: dallas
address: ${dallas_out_addr} address: ${dallas_out_addr}
name: ${dallas_out_name} name: ${dallas_out_name}
id: dallas_out_id id: dallas_out_id
on_value: on_value:
then: then:
number.set: number.set:
@@ -74,25 +74,25 @@ sensor:
} }
return 100 * (x - lo) / (hi - lo); return 100 * (x - lo) / (hi - lo);
number: number:
- platform: template - platform: template
id: fan_speed_target_in id: fan_speed_target_in
name: Fan Speed Target In name: Fan Speed Target In
optimistic: true optimistic: true
min_value: 0 min_value: 0
max_value: 100 max_value: 100
step: 1 step: 1
- platform: template - platform: template
id: fan_speed_target_out id: fan_speed_target_out
name: Fan Speed Target Out name: Fan Speed Target Out
optimistic: true optimistic: true
min_value: 0 min_value: 0
max_value: 100 max_value: 100
step: 1 step: 1
on_value_range: on_value_range:
above: 25.0 above: 25.0
then: then:
fan.turn_on: fan.turn_on:
id: duct_fan_spd_id id: duct_fan_spd_id
speed: !lambda |- speed: !lambda |-
return x; return x;
@@ -130,29 +130,6 @@ binary_sensor:
pin: ${amppwr_pin} pin: ${amppwr_pin}
name: ${amppwr_name} name: ${amppwr_name}
device_class: power device_class: power
# on_press:
# then:
# - if:
# condition:
# lambda: 'return id(${duct_fan_spd_id}).state == "OFF";'
# then:
# - logger.log: "${duct_fan_spd_name} was off. Turning on as ${amppwr_name} turned on."
# - fan.turn_on:
# id: ${duct_fan_spd_id}
# speed: LOW
# else:
# - logger.log: "${amppwr_name} turned on, but not turning on ${duct_fan_spd_name} as already on."
# on_release:
# then:
# - fan.turn_on:
# id: ${duct_fan_spd_id}
# speed: LOW
# - lambda: |-
# if (id(${duct_fan_spd_id}).is_off) {
# Enable logging # Enable logging
logger: logger: