Thinko
(Thinko)
April 19, 2024, 10:11pm
1
i have problem with yaml file,i dont know what is the problem.
esphome:
name: toplotna-gretje-lg-2
friendly_name: Toplotna gretje LG 2
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "9O3HU/YdwcUHPq5iUkXdElPiKMmyoaxQHrbWa1Mt4aU="
ota:
password: "98baa9744436e00b3e388d3b2c3b9865"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Toplotna-Gretje-Lg-2"
password: "0xUomIMPJjj0"
captive_portal:
web_server:
port: 80
## Option for I2C connector
## Comment with # if not used.
i2c:
- id: bus_a
sda: GPIO5
scl: GPIO4
scan: true
# frequency: 100kHz
### modbus ###
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
stop_bits: 1
parity: NONE
modbus:
#Niet nodig: flow_control_pin: GPIO18
id: modbus_lg
send_wait_time: 1000ms
modbus_controller:
- id: lg
## the Modbus device addres
address: 0x1
modbus_id: modbus_lg
setup_priority: -10
update_interval: 10s
binary_sensors:
- name: "hp_heating_mode"
address: 0
scan_interval: 5
slave: 1
input_type: coil
- name: "hp_flow_too_low"
address: 0
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_pump_status"
address: 1
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_compressor_status"
address: 3
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_defrost_status"
address: 4
scan_interval: 30
slave: 1
input_type: discrete_input
- name: "hp_dhw_status"
address: 5
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_disinfect_status"
address: 6
scan_interval: 60
slave: 1
input_type: discrete_input
- name: "hp_silent_status"
address: 7
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_error_status"
address: 13
scan_interval: 60
slave: 1
input_type: discrete_input
sensors:
- name: hp_mode
scan_interval: 10
address: 1
slave: 1
input_type: input
- name: hp_dhw_target_temp
scan_interval: 10
address: 8
slave: 1
input_type: holding
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: hp_dhw_tank_temp
scan_interval: 10
address: 5
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_inlet_temp"
scan_interval: 10
address: 2
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_outlet_temp"
scan_interval: 10
address: 3
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_flow_rate"
scan_interval: 10
address: 8
slave: 1
scale: 0.1
precision: 1
input_type: input
unit_of_measurement: "l/min"
- name: "hp_outdoor_air_temp"
scan_interval: 60
address: 12
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
switches:
- name: "hp_dhw_mode"
slave: 1
address: 1
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 1
state_on: 1
state_off: 0
- name: "hp_silent_mode"
slave: 1
address: 2
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 2
state_on: 1
state_off: 0
climates:
- name: "hp_heating_climate"
address: 3
slave: 1
input_type: input
max_temp: 45
min_temp: 15
offset: 0
precision: 1
scale: 0.1
target_temp_register: 2
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 0
write_registers: true
hvac_mode_register:
address: 0
values:
state_cool: 0
state_heat: 4
state_auto: 3
- name: "hp_water_climate"
address: 5
slave: 1
input_type: input
max_temp: 55
min_temp: 40
offset: 0
precision: 1
scale: 0.1
target_temp_register: 8
temp_step: 0.5
temperature_unit: C
problem in line -binary sensors:
Thinko:
binary_sensors:
You have one extra space before binary
.
1 Like
Thinko
(Thinko)
April 19, 2024, 11:18pm
3
mapping values are not allowed here
in “/config/esphome/toplotna-gretje-lg-2.yaml”, line 64, column 19
extra or no space is problem 1 line
Thinko
(Thinko)
April 19, 2024, 11:57pm
4
esphome:
name: toplotna-gretje-lg-2
friendly_name: Toplotna gretje LG 2
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "9O3HU/YdwcUHPq5iUkXdElPiKMmyoaxQHrbWa1Mt4aU="
ota:
password: "98baa9744436e00b3e388d3b2c3b9865"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Toplotna-Gretje-Lg-2"
password: "0xUomIMPJjj0"
captive_portal:
web_server:
port: 80
## Option for I2C connector
## Comment with # if not used.
i2c:
- id: bus_a
sda: GPIO5
scl: GPIO4
scan: true
# frequency: 100kHz
### modbus ###
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
stop_bits: 1
parity: NONE
modbus:
#Niet nodig: flow_control_pin: GPIO18
id: modbus_lg
send_wait_time: 1000ms
modbus_controller:
- id: lg
## the Modbus device addres
address: 0x1
modbus_id: modbus_lg
setup_priority: -10
update_interval: 10s
binary_sensors:
- name: "hp_heating_mode"
address: 0
scan_interval: 5
slave: 1
input_type: coil
- name: "hp_flow_too_low"
address: 0
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_pump_status"
address: 1
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_compressor_status"
address: 3
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_defrost_status"
address: 4
scan_interval: 30
slave: 1
input_type: discrete_input
- name: "hp_dhw_status"
address: 5
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_disinfect_status"
address: 6
scan_interval: 60
slave: 1
input_type: discrete_input
- name: "hp_silent_status"
address: 7
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_error_status"
address: 13
scan_interval: 60
slave: 1
input_type: discrete_input
sensors:
- name: hp_mode
scan_interval: 10
address: 1
slave: 1
input_type: input
- name: hp_dhw_target_temp
scan_interval: 10
address: 8
slave: 1
input_type: holding
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: hp_dhw_tank_temp
scan_interval: 10
address: 5
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_inlet_temp"
scan_interval: 10
address: 2
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_outlet_temp"
scan_interval: 10
address: 3
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_flow_rate"
scan_interval: 10
address: 8
slave: 1
scale: 0.1
precision: 1
input_type: input
unit_of_measurement: "l/min"
- name: "hp_outdoor_air_temp"
scan_interval: 60
address: 12
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
switches:
- name: "hp_dhw_mode"
slave: 1
address: 1
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 1
state_on: 1
state_off: 0
- name: "hp_silent_mode"
slave: 1
address: 2
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 2
state_on: 1
state_off: 0
climates:
- name: "hp_heating_climate"
address: 3
slave: 1
input_type: input
max_temp: 45
min_temp: 15
offset: 0
precision: 1
scale: 0.1
target_temp_register: 2
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 0
write_registers: true
hvac_mode_register:
address: 0
values:
state_cool: 0
state_heat: 4
state_auto: 3
-name: "hp_water_climate"
address: 5
slave: 1
input_type: input
max_temp: 55
min_temp: 40
offset: 0
precision: 1
scale: 0.1
target_temp_register: 8
temp_step: 0.5
temperature_unit: C
now is problem in line 222: address
Missed a space after the hyphen in name on line 221 and your indentations for the climate sensors are off.
stevemann
(Stephen Mann (YAML-challenged))
April 20, 2024, 4:47am
6
I run my yaml through yamllint.com before looking for help here.
7 Likes
Thinko
(Thinko)
April 20, 2024, 6:26pm
7
esphome:
name: toplotna-gretje-lg-2
friendly_name: Toplotna gretje LG 2
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "9O3HU/YdwcUHPq5iUkXdElPiKMmyoaxQHrbWa1Mt4aU="
ota:
password: "98baa9744436e00b3e388d3b2c3b9865"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Toplotna-Gretje-Lg-2"
password: "0xUomIMPJjj0"
captive_portal:
web_server:
port: 80
## Option for I2C connector
## Comment with # if not used.
i2c:
- id: bus_a
sda: GPIO5
scl: GPIO4
scan: true
# frequency: 100kHz
### modbus ###
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
stop_bits: 1
parity: NONE
modbus:
#Niet nodig: flow_control_pin: GPIO18
id: modbus_lg
send_wait_time: 1000ms
modbus_controller:
- id: lg
## the Modbus device addres
address: 0x1
modbus_id: modbus_lg
setup_priority: -10
update_interval: 10s
binary_sensors:
- name: "hp_heating_mode"
address: 0
scan_interval: 5
slave: 1
input_type: coil
- name: "hp_flow_too_low"
address: 0
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_pump_status"
address: 1
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_compressor_status"
address: 3
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_defrost_status"
address: 4
scan_interval: 30
slave: 1
input_type: discrete_input
- name: "hp_dhw_status"
address: 5
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_disinfect_status"
address: 6
scan_interval: 60
slave: 1
input_type: discrete_input
- name: "hp_silent_status"
address: 7
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_error_status"
address: 13
scan_interval: 60
slave: 1
input_type: discrete_input
sensors:
- name: hp_mode
scan_interval: 10
address: 1
slave: 1
input_type: input
- name: hp_dhw_target_temp
scan_interval: 10
address: 8
slave: 1
input_type: holding
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: hp_dhw_tank_temp
scan_interval: 10
address: 5
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_inlet_temp"
scan_interval: 10
address: 2
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_outlet_temp"
scan_interval: 10
address: 3
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_flow_rate"
scan_interval: 10
address: 8
slave: 1
scale: 0.1
precision: 1
input_type: input
unit_of_measurement: "l/min"
- name: "hp_outdoor_air_temp"
scan_interval: 60
address: 12
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
switches:
- name: "hp_dhw_mode"
slave: 1
address: 1
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 1
state_on: 1
state_off: 0
- name: "hp_silent_mode"
slave: 1
address: 2
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 2
state_on: 1
state_off: 0
climates:
- name: "hp_heating_climate"
address: 3
slave: 1
input_type: input
max_temp: 45
min_temp: 15
offset: 0
precision: 1
scale: 0.1
target_temp_register: 2
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 0
write_registers: true
hvac_mode_register:
address: 0
values:
state_cool: 0
state_heat: 4
state_auto: 3
-name: "hp_water_climate"
address: 5
slave: 1
input_type: input
max_temp: 55
min_temp: 40
offset: 0
precision: 1
scale: 0.1
target_temp_register: 8
temp_step: 0.5
temperature_unit: C
Yaml lint is OK
Buth when validate sensor not found.
Can sameone help and tell like telling to child?
Use binary_sensor:
and sensor:
. switch:
& climate:
too.
Not sure allowed to use plural words.
As well second climate to be aligned same as first one.
Thinko
(Thinko)
April 21, 2024, 12:09am
9
esphome:
name: toplotna-gretje-lg-2
friendly_name: Toplotna gretje LG 2
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "9O3HU/YdwcUHPq5iUkXdElPiKMmyoaxQHrbWa1Mt4aU="
ota:
password: "98baa9744436e00b3e388d3b2c3b9865"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Toplotna-Gretje-Lg-2"
password: "0xUomIMPJjj0"
captive_portal:
web_server:
port: 80
## Option for I2C connector
## Comment with # if not used.
i2c:
- id: bus_a
sda: GPIO5
scl: GPIO4
scan: true
# frequency: 100kHz
### modbus ###
uart:
id: mod_bus
tx_pin: 1
rx_pin: 3
baud_rate: 9600
stop_bits: 1
parity: NONE
modbus:
#Niet nodig: flow_control_pin: GPIO18
id: modbus_lg
send_wait_time: 1000ms
modbus_controller:
- id: lg
## the Modbus device addres
address: 0x1
modbus_id: modbus_lg
setup_priority: -10
update_interval: 10s
- binary_sensor:
- name: "hp_heating_mode"
address: 0
scan_interval: 5
slave: 1
input_type: coil
- name: "hp_flow_too_low"
address: 0
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_pump_status"
address: 1
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_compressor_status"
address: 3
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_defrost_status"
address: 4
scan_interval: 30
slave: 1
input_type: discrete_input
- name: "hp_dhw_status"
address: 5
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_disinfect_status"
address: 6
scan_interval: 60
slave: 1
input_type: discrete_input
- name: "hp_silent_status"
address: 7
scan_interval: 10
slave: 1
input_type: discrete_input
- name: "hp_error_status"
address: 13
scan_interval: 60
slave: 1
input_type: discrete_input
sensors:
- name: hp_mode
scan_interval: 10
address: 1
slave: 1
input_type: input
- name: hp_dhw_target_temp
scan_interval: 10
address: 8
slave: 1
input_type: holding
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: hp_dhw_tank_temp
scan_interval: 10
address: 5
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_inlet_temp"
scan_interval: 10
address: 2
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_outlet_temp"
scan_interval: 10
address: 3
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
- name: "hp_flow_rate"
scan_interval: 10
address: 8
slave: 1
scale: 0.1
precision: 1
input_type: input
unit_of_measurement: "l/min"
- name: "hp_outdoor_air_temp"
scan_interval: 60
address: 12
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: "°C"
switches:
- name: "hp_dhw_mode"
slave: 1
address: 1
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 1
state_on: 1
state_off: 0
- name: "hp_silent_mode"
slave: 1
address: 2
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 2
state_on: 1
state_off: 0
climates:
- name: "hp_heating_climate"
address: 3
slave: 1
input_type: input
max_temp: 45
min_temp: 15
offset: 0
precision: 1
scale: 0.1
target_temp_register: 2
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 0
write_registers: true
hvac_mode_register:
address: 0
values:
state_cool: 0
state_heat: 4
state_auto: 3
-name: "hp_water_climate"
address: 5
slave: 1
input_type: input
max_temp: 55
min_temp: 40
offset: 0
precision: 1
scale: 0.1
target_temp_register: 8
temp_step: 0.5
temperature_unit: C
is always problem in binary sensor row. I dont know
Still not valid YAML.
You need to remove the hyphen in front of binary_sensor at line 64.
jackoncept
(Jackoncept)
April 21, 2024, 12:22pm
11
Thanks to your thread I was able to finally manage to add hp_heating_climate to my HA. Still everything works fine when I switch to AUTO, HEAT, COOL, but when I select OFF; the HP goes again in COOL mode.
Do you have the same behavior ?
Thinko
(Thinko)
April 21, 2024, 12:26pm
12
No i have problem with yaml. I cant campile yaml to validate and than install to my d1mini rs485. If sameone send me yaml and than i can test. Im noob with coding in esp yaml.
Thinko
(Thinko)
April 23, 2024, 11:47am
13
valid yaml with yamil lint.
but problems with instal error:
INFO ESPHome 2024.4.1
INFO Reading configuration /config/esphome/toplotna-gretje-lg-2.yaml...
Failed config
binary_sensors: [source /config/esphome/toplotna-gretje-lg-2.yaml:47]
Component not found: binary_sensors.
- platform: custom
- name: hp_heating_mode
address: 0
scan_interval: 5
slave: 1
input_type: coil
- name: hp_flow_too_low
address: 0
scan_interval: 10
slave: 1
input_type: discrete_input
- name: hp_pump_status
address: 1
scan_interval: 10
slave: 1
input_type: discrete_input
- name: hp_compressor_status
address: 3
scan_interval: 10
slave: 1
input_type: discrete_input
- name: hp_defrost_status
address: 4
scan_interval: 30
slave: 1
input_type: discrete_input
- name: hp_dhw_status
address: 5
scan_interval: 10
slave: 1
input_type: discrete_input
- name: hp_disinfect_status
address: 6
scan_interval: 60
slave: 1
input_type: discrete_input
- name: hp_silent_status
address: 7
scan_interval: 10
slave: 1
input_type: discrete_input
- name: hp_error_status
address: 13
scan_interval: 60
slave: 1
- input_type: discrete_input
sensors: [source /config/esphome/toplotna-gretje-lg-2.yaml:95]
Component not found: sensors.
- platform: custom
- name: hp_mode
scan_interval: 10
address: 1
slave: 1
input_type: input
- name: hp_dhw_target_temp
scan_interval: 10
address: 8
slave: 1
input_type: holding
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: °C
- name: hp_dhw_tank_temp
scan_interval: 10
address: 5
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: °C
- name: hp_inlet_temp
scan_interval: 10
address: 2
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: °C
- name: hp_outlet_temp
scan_interval: 10
address: 3
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: °C
- name: hp_flow_rate
scan_interval: 10
address: 8
slave: 1
scale: 0.1
precision: 1
input_type: input
unit_of_measurement: l/min
- name: hp_outdoor_air_temp
scan_interval: 60
address: 12
slave: 1
input_type: input
scale: 0.1
precision: 1
device_class: temperature
unit_of_measurement: °C
switches: [source /config/esphome/toplotna-gretje-lg-2.yaml:155]
Component not found: switches.
- platform: custom
- name: hp_dhw_mode
slave: 1
address: 1
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 1
state_on: 1
state_off: 0
- name: hp_silent_mode
slave: 1
address: 2
write_type: coil
command_on: 1
command_off: 0
verify:
input_type: coil
address: 2
state_on: 1
state_off: 0
climates: [source /config/esphome/toplotna-gretje-lg-2.yaml:179]
Component not found: climates.
- platform: custom
- name: hp_heating_climate
address: 3
slave: 1
input_type: input
max_temp: 45
min_temp: 15
offset: 0
precision: 1
scale: 0.1
target_temp_register: 2
temp_step: 0.5
temperature_unit: C
hvac_onoff_register: 0
write_registers: True
hvac_mode_register:
address: 0
values:
state_cool: 0
state_heat: 4
state_auto: 3
- name: hp_water_climate
address: 5
slave: 1
input_type: input
max_temp: 55
min_temp: 40
offset: 0
precision: 1
scale: 0.1
target_temp_register: 8
temp_step: 0.5
temperature_unit: C
Use binary_sensor: and sensor:. switch: & climate: too.
Not sure allowed to use plural words.
As well second climate to be aligned same as first one.
It’s binary_sensor. Not binary_sensors.
You need to make sure you are using the correct spelling of the components.
https://esphome.io/components/
Thinko
(Thinko)
April 23, 2024, 11:02pm
15
sensor,two sensors,3 sensors… it dosent matter,