Closed sidren closed 2 years ago
I am using this with an Adafruit LC709203f board with a garden solar sensor.
I've got it working (with some code changes due to esphome updates that I've forked from here) by doing the following:
In the esphome folder that contains all of your configs, create a folder called 'custom_components' and copy the files into a subfolder called 'lc709203f'
In my yaml I have the following bits of code :
external_components:
- source:
type: local
path: custom_components
i2c:
- id: bus_a
sda: 23
scl: 22
scan: False
sensor:
- platform: lc709203f
address: 0x0B
i2c_id: bus_a
battery_voltage:
name: "Garden sensor battery V"
filters:
- sliding_window_moving_average:
window_size: 5
send_every: 5
battery_level:
name: "Garden sensor battery lvl"
filters:
- sliding_window_moving_average:
window_size: 5
send_every: 5
icversion:
name: "Garden sensor IC"
cell_charge:
name: "Garden sensor cell charge"
filters:
- sliding_window_moving_average:
window_size: 5
send_every: 5
#send_first_at: 3
update_interval: 1s
This feeds back all the information into my homeassistant server.
Hope this helps!
Thank You! Unfortunately despite following your exact steps. I get an error "Platform not found: 'sensor.lc709203f'. I'm using the esphome addon version from home assistant (2022.4.0).
Disregard. I used your forked version files and now all is well. Thank you!!
I have a few of the ESP32_Bat_Pro boards, and cant seem to figure out how to add these files to esphome? Could you give me a few more instructions on how to setup my yaml? I have added these to my config directory, but can't seem to figure out how to esphome to use the sensor.
Thank you for putting this together.