Kód:
sensor: - platform: adc pin: 34 name: "ESP Proud" unit_of_measurement: "A" # device_class: "current" state_class: "measurement" id: proud update_interval: 1s filters: - multiply: 10.0 on_value: then: - lambda: |- if (id(proud).state > 1) { id(doba_podavani) +=1; }
Statistiky: Napsal od Pete30 — 19. březen 2024, 08:12
Statistiky: Napsal od Tad — 19. březen 2024, 08:03
Kód:
esphome: name: esphome-web-82d090 friendly_name: ESPHome Current_Sensoresp32: board: esp32dev framework: type: Arduino# Enable logginglogger:# Enable Home Assistant APIapi: encryption: key: "dE1QBQt9mbBimeMW22qvb+H1Ya3nrb/V/UTvcRaMSJM="ota:# Připojení k Wifiwifi: ssid: !secret wifi_ssid password: !secret wifi_password use_address: 192.168.1.99 # vytvoření vlastního HOTSPOT při výpadku wifi ap: ssid: "Esphome-Web-82D090" password: "WgBUNY6y5gYj"captive_portal:# Definice globální proměnnéglobals: - id: doba_podavani type: int restore_value: no initial_value: '0' # Definice senzorů sensor: - platform: adc pin: 34 name: "ESP Proud" unit_of_measurement: "A" # device_class: "current" state_class: "measurement" id: proud update_interval: 1s filters: - multiply: 10.0 on_value: then: - lambda: |- if (id(proud).state > 1) { id(doba_podavani) +=1; } - platform: wifi_signal name: "WiFi Signál" id: wifi_sensor update_interval: 5min #Vytvoření spínačůswitch: #Reset počitadla podavače - platform: template name: "Reset doby podávání" turn_on_action: - globals.set: id: doba_podavani value: '0'
Kód:
# Globální proměnná z ESP32sensor: - platform: integration source: sensor.doba_podavani name: "Doba behu podavace"
Statistiky: Napsal od Andy — 19. březen 2024, 00:06
Kód:
switch: - platform: gpio pin: number: P24 inverted: true id: off_relay name: "OFF Relay" restore_mode: RESTORE_INVERTED_DEFAULT_OFF internal: True interlock: [on_relay] on_turn_on: - light.turn_off: led - binary_sensor.template.publish: id: relaystate state: OFF - delay: 100ms - switch.turn_off: off_relay - platform: gpio pin: number: P26 inverted: true id: on_relay name: "ON Relay" restore_mode: ALWAYS_ON internal: True interlock: [off_relay] on_turn_on: - light.turn_on: led - binary_sensor.template.publish: id: relaystate state: ON - delay: 100ms - switch.turn_off: on_relay
Statistiky: Napsal od blavak68 — 18. březen 2024, 23:24
Statistiky: Napsal od mirecekd — 18. březen 2024, 20:03
Statistiky: Napsal od Tad — 18. březen 2024, 19:06
Statistiky: Napsal od okoun — 18. březen 2024, 14:15
Statistiky: Napsal od Tester — 18. březen 2024, 14:13
Statistiky: Napsal od puls — 18. březen 2024, 13:02