Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- substitutions:
- devicename: heatpump
- description: Heatpump Controller
- entity_prefix: Heatpump
- globals:
- - id: unmasked_value_water_temperature_t1s
- type: int
- restore_value: no
- initial_value: '0'
- - id: unmasked_curve_selection
- type: int
- restore_value: no
- initial_value: '0'
- esphome:
- name: "${devicename}"
- comment: "${description}"
- esp32:
- board: esp32dev
- framework:
- type: arduino
- # Enable logging
- logger:
- level: INFO
- baud_rate: 0
- # Enable Home Assistant API
- ota:
- wifi:
- ssid: !secret wifi_ssid
- password: !secret wifi_password
- # Enable fallback hotspot (captive portal) in case wifi connection fails
- ap:
- ssid: "Esphome-Web-3F8D40"
- password: "zHZ2Ur5uDMVz"
- captive_portal:
- mqtt:
- broker: "mqtt_broker_ip_address"
- username: "mqtt_username"
- password: "mqtt_password"
- uart:
- id: mod_bus
- tx_pin: 17
- rx_pin: 16
- baud_rate: 9600
- stop_bits: 1
- modbus:
- flow_control_pin: 5
- id: heatpump_modbus
- modbus_controller:
- - id: "${devicename}"
- ## the Modbus device addr
- address: 0x1
- modbus_id: heatpump_modbus
- setup_priority: -10
- update_interval: 10s
- sensor:
- # Register: 1
- - platform: modbus_controller
- modbus_controller_id: "${devicename}"
- name: "${entity_prefix} Operational Mode"
- id: "${devicename}_operational_mode"
- register_type: holding
- address: 0x1
- value_type: U_WORD
- on_value:
- - mqtt.publish_json:
- topic: "heatpump/operational_mode"
- payload: |-
- root["${entity_prefix} Operational Mode"] = id(${devicename}_operational_mode).state;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement