Serial input "Unknown"

Hi,

I have a strange case with my HASS running in a virtual DietPi machine (VMWare).

I have an Eco-Eye powerusage monitor with a serial interface, sending actual usage.

I have the serial interface available in my DietPi HASS VM and confirmed that the data is available at serial port ttyS0.

Using minicom -D /dev/ttyS0, I get the actual usage, updated every few seconds:

    002.31
    002.31
    002.38
    002.38

etc…

My configuration,yaml:

  - platform: serial
    #name: serial_input_ampere
    serial_port: /dev/ttyS0
    baudrate: 19200

Still, in HASS I now have a serial_sensor available, no error in the log, but state is ‘unknown’.

Any suggestions?

EDIT: configuration code, thanks to sjee

I think it should be like this;

- platform: serial
  serial_port: /dev/ttyS0
  baudrate: 19200

Although I would expect and error in the log.

I think I found the problem cause!
The Eco_Eye ends each line with 0x0D (\r or CR) instead of the expected 0x0A (\n or LF).

Is there a way to make the serial_input module look for 0x0D instead?