20260326
This commit is contained in:
127
esphome/archive/badkamer-radiator-fan.yaml
Normal file
127
esphome/archive/badkamer-radiator-fan.yaml
Normal file
@@ -0,0 +1,127 @@
|
||||
|
||||
substitutions:
|
||||
device_name: "badkamerradfan"
|
||||
friendly_name: "badkamerradfan"
|
||||
comment: "esp32-c3 - BTproxy"
|
||||
location: "Badkamer"
|
||||
api_password: !secret badkamerradfan_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
ip: !secret badkamerradfan_ip
|
||||
pin_temp: GPIO3
|
||||
pin_pwm: GPIO2
|
||||
pin_tach1: GPIO6
|
||||
pin_tach2: GPIO7
|
||||
pin_tach3: GPIO9
|
||||
pin_status: GPIO8
|
||||
ledc_freq: "1000"
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-C3.yaml
|
||||
device_base: !include common/common.yaml
|
||||
connection: !include common/wifi.yaml
|
||||
status: !include templates/status.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
bt_proxy: !include common/bluetooth.yaml
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: ${pin_pwm}
|
||||
id: pwm1
|
||||
frequency: ${ledc_freq}
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
output: pwm1
|
||||
name: "Badkamer radiator Fan"
|
||||
id: badkamerfan
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
|
||||
# Example configuration entry
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: ${pin_temp}
|
||||
|
||||
# Individual sensors
|
||||
sensor:
|
||||
- platform: dallas_temp
|
||||
address: 0xb1800000081e5a28
|
||||
name: "Radiataor Temperature"
|
||||
id: radtemperature
|
||||
on_value_range:
|
||||
- above: !lambda return id(TemperatureOn).state;
|
||||
then:
|
||||
- fan.turn_on: badkamerfan
|
||||
- below: !lambda return id(TemperatureOff).state;
|
||||
then:
|
||||
- fan.turn_off: badkamerfan
|
||||
|
||||
- platform: pulse_counter
|
||||
pin:
|
||||
number: ${pin_tach1}
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
name: fan1 PWM
|
||||
id: fan_pulse1
|
||||
unit_of_measurement: 'RPM'
|
||||
filters:
|
||||
- multiply: 0.5
|
||||
count_mode:
|
||||
rising_edge: INCREMENT
|
||||
falling_edge: DISABLE
|
||||
update_interval: 3s
|
||||
- platform: pulse_counter
|
||||
pin:
|
||||
number: ${pin_tach2}
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
name: fan2 PWM
|
||||
id: fan_pulse2
|
||||
unit_of_measurement: 'RPM'
|
||||
filters:
|
||||
- multiply: 0.5
|
||||
count_mode:
|
||||
rising_edge: INCREMENT
|
||||
falling_edge: DISABLE
|
||||
update_interval: 3s
|
||||
- platform: pulse_counter
|
||||
pin:
|
||||
number: ${pin_tach3}
|
||||
mode:
|
||||
input: true
|
||||
pullup: true
|
||||
name: fan3 PWM
|
||||
id: fan_pulse3
|
||||
unit_of_measurement: 'RPM'
|
||||
filters:
|
||||
- multiply: 0.5
|
||||
count_mode:
|
||||
rising_edge: INCREMENT
|
||||
falling_edge: DISABLE
|
||||
update_interval: 3s
|
||||
|
||||
number:
|
||||
- platform: template
|
||||
name: "Fan on temp"
|
||||
id: TemperatureOn
|
||||
optimistic: true
|
||||
min_value: 15
|
||||
max_value: 65
|
||||
restore_value: True
|
||||
initial_value: 28
|
||||
step: 1
|
||||
|
||||
- platform: template
|
||||
name: "Fan off temp"
|
||||
id: TemperatureOff
|
||||
optimistic: true
|
||||
min_value: 15
|
||||
max_value: 65
|
||||
restore_value: True
|
||||
initial_value: 24
|
||||
step: 1
|
||||
Reference in New Issue
Block a user