HA Pylontech battery integration with ESPhome using esp8266 - help / assistance requested

Hi, Im a total newbie to this forum, but ive been looking at topics on the Pylontech batteries integration & im very very stuck.

I am using an ESP8266 D1 mini & a RS232 to TTL interface.

The above setup appears to work, but the battery info only gets as far as the ESP 8266 & is visible in the ESPHome logs

The HA can see the ESP & the fields requested, but nothing appeares in the HA, I can select the heading for the data but below this is “unknown” (sorry if im not using the correct terms here but Im also new to HA)

I havent worked out how to copy & paste my yaml code yet, but when I do, i will update this topic.

If anyone can cast any light on this, that would be great.

If anyone would like any further info, please just shout out & I will try to post it here

Here is my yaml code - most of it is coppied from a range of posts on this forum & on github.

# Board: Wemos D1 Mini (ESP8266) (Wemos)
# Definition: definitions/boards/d1_mini/manifest.yaml

esphome:
  name: pylontech-d1-mini
  friendly_name: Pylontech D1 mini

esp8266:
  board: d1_mini

external_components:
  - source: github://oxan/esphome-stream-server
#stream-server     #-uart:
  #id: uart_bus
  # add further configuration for the UART here
stream_server:
  uart_id: uart_pylon
  port: 1234

logger:
   baud_rate: 1200
#******************************
# Configure UART connected to the Pylontech console port (via RS232-to-TTL adapter like MAX3232)
uart:
  - id: uart_pylon
    tx_pin: GPIO5  # Adjust to your wiring (e.g., GPIO1 / TX)
    rx_pin: GPIO4  # Adjust to your wiring (e.g., GPIO3 / RX)
    baud_rate: 115200  # was 9600
    data_bits: 8
    parity: NONE
    stop_bits: 1
    rx_buffer_size: 4096
    #rx_full_threshold: 64
    #rx_timeout: 10

pylontech:
  id: pylontech_battery
  uart_id: uart_pylon
  update_interval: 15s

sensor:
  - platform: pylontech
    pylontech_id: pylontech_battery
    battery: 1
    
    voltage:
      name: Battery Voltage
      id: battery_voltage
      unit_of_measurement : V
      
    current:
      name: Battery Current
      
    temperature:
      name: Battery Temperature
      
    coulomb:
      name: state_of_charge_(SoC)

text_sensor:
  - platform: pylontech
    pylontech_id: pylontech_battery
    battery: 1
    
    base_state:
      entity_category: ""
      name: Battery State
      
    voltage_state:
      entity_category: ""
      name: Battery Voltage State
      
    current_state:
      name: Battery Current State
      
    temperature_state:
      name: Battery Temperature State



  
#*******************************

api:
  Key =""

Secret bits & bobs in this space

captive_portal:

This is just an afterthought addition, I have also just checked the HA Logs and there is no reported errors for this device.

Here is a screenshot of the log file in ESPhome for the D1 mini / RS232 to TTL converter

Hello DSH170,

Welcome to the Home Assistant Forum!

Thanks for coming here and asking a question.
Would you be so kind as to adjusting the format of your code so that we can read it properly & check the YAML spacing, etc. Editing your original is the preferred way. It is very hard for us to tell what is what when the text formatter jumbles everything like that.
You can use the </> button like this… How to format your code in forum posts
OR… Here is an example of how to fix formatting from the site FAQ Page.
How to help us help you - or How to ask a good question.

Thanks for the pointer for formatting text around code, it took a little while to find the editing symbols due to me doing all of this from a tablet

I think that im heading up a fast learning curve.