Time On Tuya HeimVision A80S

I have a HeimVision A80S. I desoldered the esp on it and soldered a classic ESp-8266 chip. I programmed it with the code from

Most of the entities worked good. I did modify a couple of entities who where not properly working.

I never got the time component working properly. Below my code:

time:
  - platform: sntp
    timezone: "America/Montreal"
    id: sntp_time

tuya:
  id: light_tuya
  time_id: sntp_time
  on_datapoint_update:
    - sensor_datapoint: 127
      datapoint_type: raw
      then:
        - lambda: |-
            ESP_LOGD("tuya", "on_datapoint_update %s", hexencode(x).c_str());

I don’t understand what ESP_LOGD does exactly and how it works. The Time doesn’t change on the display. Below some datapoint who look interesting:

[18:52:22][C][tuya:054]:   Datapoint 107: raw (value: 19.01)
[18:52:23][C][tuya:054]:   Datapoint 127: raw (value: 00.02.D0.7F.0F.01.01.0A.01.0A.0A.00.00.02.D0.7F.0F.01.01.0A.01.0A.0A.00.00.02.D0.7F.0F.01.01.0A.01.0A.0A.00.00.02.D0.7F.0F.01.01.0A.01.0A.0A.00 (48))
[18:52:23][C][tuya:054]:   Datapoint 128: raw (value: 00.01.01.0A.1E.01.1E.0F.1E.01 (10))

The datapoint 107 is used to change the radio post (and changing the radio works well) so I wonder if maybe the code to send the time isn’t right or maybe it’s a different datapoint to store the time on the system ?? Please be aware that I have tryed changing 127 by 107 and 128 as well. Nothing works.

I would need some help please.
Thanks a lot!

Okay, I found that the datapoint 103 track the time in a string format like 103300 (hhmmss). I have tryed converting the sntp time to string, but I’m unable to do that. In the end I added a button to reset the time at 12:00 :

  - platform: template
    name: "Reset Time to 12:00"
    icon: "mdi:timer"
    on_press:
      - lambda: |-
            id(light_tuya).set_string_datapoint_value(103, "120000");