20240410
This commit is contained in:
77
esphome/badkamer-radiator-fan.yaml
Normal file
77
esphome/badkamer-radiator-fan.yaml
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
substitutions:
|
||||
device_name: "badkamerradfan"
|
||||
friendly_name: "badkamerradfan"
|
||||
comment: "esp32-c3"
|
||||
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: GPIO4
|
||||
pin_tach: GPIO2
|
||||
pin_status: GPIO8
|
||||
ledc_freq: "16000"
|
||||
|
||||
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
|
||||
|
||||
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_ON
|
||||
|
||||
# Example configuration entry
|
||||
dallas:
|
||||
- pin: ${pin_temp}
|
||||
|
||||
# Individual sensors
|
||||
sensor:
|
||||
- platform: dallas
|
||||
address: 0x59800000081fd028
|
||||
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
|
||||
|
||||
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