WT32-SC01 with esphome

Nice work!
The question is… is it worth the effort for soooooooooooo much customisation work to be done in order to get touch points and layouts exactly right… or is it a more effective use of time to get an Android tablet and load Fully Kiosk Browser on it?

For me, I went with the latter as I’ve spend waaaaaay too many hours with both ESPHome and openHASP to try to get the tiny little $40 unit to work with even basic functionality.

1 Like

Actually, that is super helpful, thank you!
I’ve been able to replicate that, because following on from my previous comment - when I removed the Amazon Echo Dot with clock from our bedroom the other day we were left without a clock.
Given the WT32-SC01 was no longer being used, I quickly repurposed it as a basic clock display - but with A LOT more control over format, lighting levels at night, and also to show the currently playing track on the speaker it’s sitting on top of.

Thanks to you figuring out the touch screen, I’ll now be able to put a skip button on there.
Will share the code once I’ve got it going.

Ok, got it working, thank you @nouknouk for your researching and learnings on the touchscreen parts.
Here’s the YAML for ESPHome:

substitutions:
  name: "bedroom-clock"
  friendly_name: "Bedroom clock"
  id_prefix: "bedroom_clock"

esphome:
  name: ${name}
  comment: "WT32-SC01"
  on_boot:
    then:
      - if:
          condition:
            text_sensor.state:
              id: clock_mode
              state: "Night"
          then:
            - display.page.show: Night
            - light.turn_on:
                id: ${id_prefix}_backlight
                brightness: 25%
      - if:
          condition:
            text_sensor.state:
              id: clock_mode
              state: "Morning"
          then:
            - light.turn_on:
                id: ${id_prefix}_backlight
                brightness: 50%
      - if:
          condition:
            text_sensor.state:
              id: clock_mode
              state: "Day"
          then:
            - display.page.show: Day
            - light.turn_on:
                id: ${id_prefix}_backlight
                brightness: 75%


esp32:
  board: esp-wrover-kit
  framework:
    type: arduino

packages:
  device_base: !include includes/common_settings.yaml

external_components:
  - source: github://gpambrozio/esphome@FT6336U-touch
    components: [ ft63x6 ]


time:
  - platform: homeassistant
    id: homeassistant_time

output:
  - platform: ledc
    pin: GPIO23
    id: gpio_23_backlight_pwm
light:
  - platform: monochromatic
    output: gpio_23_backlight_pwm
    name: "${friendly_name} Backlight"
    id: ${id_prefix}_backlight
    restore_mode: RESTORE_DEFAULT_ON

i2c:
  id: i2c_bus_intern
  sda: 18
  scl: 19
  scan: false

spi:
  clk_pin: GPIO14
  mosi_pin: GPIO13
  miso_pin: GPIO12

button:
  - platform: restart
    name: "${friendly_name} restart"

display:
  - platform: ili9xxx
    id: ${id_prefix}_display
    model: ST7796
    cs_pin: GPIO15
    dc_pin: GPIO21
    reset_pin: GPIO22
    rotation: 90
    pages:
      - id: Day
        lambda: |-
         it.printf(245, 210, id(xxxxxlarge_font), TextAlign::BASELINE_CENTER, "%s", id(readable_ha_time).state.c_str());
      - id: Music
        lambda: |-
         it.printf(150, 10, id(xxlarge_font), TextAlign::TOP_LEFT, "%s", id(readable_ha_time).state.c_str());
         it.printf(50, 150, id(medium_font), TextAlign::TOP_LEFT, "%s", id(media_artist).state.c_str());
         it.printf(50, 200, id(medium_font), TextAlign::TOP_LEFT, "%s", id(media_title).state.c_str());
         it.printf(425, 280, id(small_font), TextAlign::TOP_LEFT, "SKIP");
      - id: Night
        lambda: |-
         it.printf(245, 210, id(xxxxxlarge_font), my_red, TextAlign::BASELINE_CENTER, "%s", id(readable_ha_time).state.c_str());

touchscreen:
  - platform: ft63x6
    id: ${id_prefix}_touch
    i2c_id: i2c_bus_intern
    on_touch:
      - logger.log:
          format: Touch at (%d, %d)
          args: [touch.x, touch.y]

font:
  - file:
      type: gfonts
      family: "Open Sans"
    id: xxxxxlarge_font
    size: 160
  - file:
      type: gfonts
      family: "Open Sans"
    id: xxxxlarge_font
    size: 140
  - file:
      type: gfonts
      family: "Open Sans"
    id: xxxlarge_font
    size: 120
  - file:
      type: gfonts
      family: "Open Sans"
    id: xxlarge_font
    size: 100
  - file:
      type: gfonts
      family: "Open Sans"
    id: xlarge_font
    size: 80
  - file:
      type: gfonts
      family: "Open Sans"
    id: large_font
    size: 60
  - file:
      type: gfonts
      family: "Open Sans"
    id: medium_font
    size: 40
  - file:
      type: gfonts
      family: "Open Sans"
    id: small_font
    size: 20


color:
  - id: my_red
    red: 100%
    green: 3%
    blue: 5%
  - id: my_white
    red: 100%
    green: 100%
    blue: 100%


text_sensor:
  - platform: homeassistant
    id: media_artist
    entity_id: media_player.master_bedroom
    attribute: media_artist
    internal: true

  - platform: homeassistant
    id: media_title
    entity_id: media_player.master_bedroom
    attribute: media_title
    internal: true

  - platform: homeassistant
    id: media_image
    entity_id: media_player.master_bedroom
    attribute: entity_picture
    internal: true

  - platform: homeassistant
    id: media_state
    entity_id: media_player.master_bedroom
    internal: true
    on_value:
      - if:
          condition:
            text_sensor.state:
              id: media_state
              state: 'playing'
          then:
            - display.page.show: Music
          else:
            - display.page.show: Day


  - platform: homeassistant
    name: Readable_time
    entity_id: sensor.12h_time
    id: readable_ha_time

  - platform: homeassistant
    id: clock_mode
    entity_id: input_select.bedroom_clock_mode
    on_value:
      then:
        - if:
            condition:
              text_sensor.state:
                id: clock_mode
                state: "Night"
            then:
              - display.page.show: Night
              - light.turn_on:
                  id: ${id_prefix}_backlight
                  transition_length: 0.1s
                  brightness: 25%
        - if:
            condition:
              text_sensor.state:
                id: clock_mode
                state: "Morning"
            then:
              - light.turn_on:
                  id: ${id_prefix}_backlight
                  transition_length: 0.1s
                  brightness: 50%
        - if:
            condition:
              text_sensor.state:
                id: clock_mode
                state: "Day"
            then:
              - light.turn_on:
                  id: ${id_prefix}_backlight
                  transition_length: 0.1s
                  brightness: 75%

binary_sensor:
  - platform: touchscreen
    name: Skip
    id: skip_track
    internal: True
    x_min: 420
    x_max: 470
    y_min: 280
    y_max: 320
    filters:
      - delayed_on: 30ms
    on_press:
      - homeassistant.service:
          service: media_player.media_next_track
          data:
            entity_id: media_player.master_bedroom

I have a dropdown helper called “Bedroom clock mode”, which has options of: Day, Night, Morning.
These will make the screen to switch to another page where the clock is in red font and set the backlight brightness values depending on time of day. This is used by the automations in HA.

I could probably make this cleaner using a scene, but this works for now.
Automation actions for switching the screen out of night mode, but not turning up the backlight too much:

service: input_select.select_option
data:
  option: Morning
target:
  entity_id: input_select.bedroom_clock_mode

Automation actions for setting the brightness to 100% when the blinds are opened:

service: input_select.select_option
data:
  option: Day
target:
  entity_id: input_select.bedroom_clock_mode

Automation actions for dimming the clock and getting it to change to the page with the red font (aka “night mode” - when my wife turns her lamp off):

service: input_select.select_option
data:
  option: Night
target:
  entity_id: input_select.bedroom_clock_mode

Here’s the clock in normal daytime:

Here’s the clock when a song is playing on the speaker that it’s sitting on top of:

This is how it looks at night (unfortunately the phone tried to compensate for the dark, so it looks a lot brighter than it actually is):

And here it is when we wake up in the morning, but aren’t fully awake yet (again, looks brighter than it actually is):

Next steps from here would be to figure out if I can word wrap the song title, maybe show duration and current position (I’m already pulling those values but not using them yet), and getting a right-angled USB cable.

1 Like

Great work and wanted to jump in as well. I screwed up a bit by ordering the WT32-SC01 plus version which has a nicer display and frame. https://www.antratek.com/media/wysiwyg/pdf/WT32-SC01-Plus-V1.3-EN.pdf

What I didn’t notice is that it also uses the newer ESP32S3 chip, nice in itself but I cannot get it to compile and upload in ESPHOME. Tried downloading and uploading via low lever ESPFLASH tools but I end up in a boot loop… :woozy_face:

Well one step, got it working with this:

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino

Touch and backlight work but apparently the ST7796 display is hard wired for 8 bit parallel interface (The IM0…IM2 pins)… anybody a clue how to proceed with this?

Thanks.

1 Like

Has anyone tried the modbus capabilities of the panel yet? It has an rs485 connection. There is an esphome modbus component. Modbus works for me on another esp home device. it would be good to write out things, read values.

Hey, have you had any luck with this panel? I bought the same one and get the same results backlight works touch works and i have reset working but thats all. nothing displaying :expressionless:

No not yet, will require a updated driver since it is using a different communication protocol.

Dam! I’m going to get the WT-SCO1 and see how that one goes and use the Plus for something else.

checking in on this, any progress? Ideally I’d love to be able to use this with open wake word to make a local version of an echo show or google home

Using examples/code from this thread I was able to create a working configuration. You can check it on:

Thanks!

2 Likes

The documentation is fleshed out a lot better now. Touch Panel ESP32 | OXRS Docs

I have been usign a couple with node-red and home assistant for a couple of years now.

What about the plus version with parallel data? is that supported?

I am running my code on the older (non plus) version. I ordered a plus version. More info after I received/tested it. For the plus version there is an interesting development by strange-v: GitHub - strange-v/ha_deck: Config-driven Home Assistant dashboard (built on top of ESPHome)

2 Likes

Thx for pointing me to this development. I will check if I can use it with the plus board

1 Like

hi many thanks for your job !
reading all this posts help me done something cool , for the moment only one page … but it’s work in progress

3 Likes

My SC01 plus has been working great - until the latest ESPHome 2025.7.0 update. Was working fine with the 2025.6.x version… Any ideas?

INFO ESPHome 2025.7.0
INFO Reading configuration /config/esphome/sc01-plus-1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing sc01-plus-1 (board: esp32-s3-devkitc-1; framework: arduino; platform: https://github.com/pioarduino/platform-espressif32/releases/download/53.03.13/platform-espressif32.zip)
--------------------------------------------------------------------------------
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
 - framework-arduinoespressif32 @ 3.1.3 
 - framework-arduinoespressif32-libs @ 5.3.0+sha.489d7a2b3a 
 - tool-esptoolpy @ 4.8.6 
 - tool-mklittlefs @ 3.2.0 
 - tool-riscv32-esp-elf-gdb @ 14.2.0+20240403 
 - tool-xtensa-esp-elf-gdb @ 14.2.0+20240403 
 - toolchain-riscv32-esp @ 13.2.0+20240530 
 - toolchain-xtensa-esp-elf @ 13.2.0+20240530
Dependency Graph
|-- Networking @ 3.1.3
|-- AsyncTCP @ 3.4.5
|-- WiFi @ 3.1.3
|-- FS @ 3.1.3
|-- Update @ 3.1.3
|-- ESPAsyncWebServer @ 3.7.10
|-- ESPmDNS @ 3.1.3
|-- noise-c @ 0.1.10
|-- ArduinoJson @ 7.4.2
|-- LovyanGFX @ 1.2.7
|-- lvgl @ 8.4.0
Compiling .pioenvs/sc01-plus-1/src/main.cpp.o
Compiling .pioenvs/sc01-plus-1/lib0f0/ESPAsyncWebServer/WebServer.cpp.o
Compiling .pioenvs/sc01-plus-1/lib915/ESPmDNS/ESPmDNS.cpp.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c.o
Archiving .pioenvs/sc01-plus-1/lib915/libESPmDNS.a
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_core/salsa/ref/core_salsa_ref.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_hash/crypto_hash.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_hash/sha256/hash_sha256.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_onetimeauth/crypto_onetimeauth.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c.o
/config/esphome/sc01-plus-1.yaml: In function 'void setup()':
/config/esphome/sc01-plus-1.yaml:676:78: error: no matching function for call to 'esphome::Automation<long int>::Automation(esphome::ha_deck::HdSliderChangeTrigger*&)'
  676 | 
      |                                                                              ^
In file included from src/esphome/components/sensor/filter.h:6,
                 from src/esphome/components/sensor/sensor.h:7,
                 from src/esphome/core/application.h:29,
                 from src/esphome/components/api/api_frame_helper.h:17,
                 from src/esphome/components/api/api_connection.h:5,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
src/esphome/core/automation.h:286:12: note: candidate: 'esphome::Automation<Ts>::Automation(esphome::Trigger<Ts ...>*) [with Ts = {long int}]'
  286 |   explicit Automation(Trigger<Ts...> *trigger) : trigger_(trigger) { this->trigger_->set_automation_parent(this); }
      |            ^~~~~~~~~~
src/esphome/core/automation.h:286:39: note:   no known conversion for argument 1 from 'esphome::ha_deck::HdSliderChangeTrigger*' to 'esphome::Trigger<long int>*'
  286 |   explicit Automation(Trigger<Ts...> *trigger) : trigger_(trigger) { this->trigger_->set_automation_parent(this); }
      |                       ~~~~~~~~~~~~~~~~^~~~~~~
src/esphome/core/automation.h:284:32: note: candidate: 'constexpr esphome::Automation<long int>::Automation(const esphome::Automation<long int>&)'
  284 | template<typename... Ts> class Automation {
      |                                ^~~~~~~~~~
src/esphome/core/automation.h:284:32: note:   no known conversion for argument 1 from 'esphome::ha_deck::HdSliderChangeTrigger*' to 'const esphome::Automation<long int>&'
src/esphome/core/automation.h:284:32: note: candidate: 'constexpr esphome::Automation<long int>::Automation(esphome::Automation<long int>&&)'
src/esphome/core/automation.h:284:32: note:   no known conversion for argument 1 from 'esphome::ha_deck::HdSliderChangeTrigger*' to 'esphome::Automation<long int>&&'
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_scalarmult/crypto_scalarmult.c.o
Archiving .pioenvs/sc01-plus-1/lib0f0/libESPAsyncWebServer.a
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/chacha20/stream_chacha20.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/crypto_stream.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/salsa20/stream_salsa20.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6-asm.S.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/crypto_verify/verify.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/randombytes/internal/randombytes_internal_random.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/randombytes/randombytes.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/randombytes/sysrandom/randombytes_sysrandom.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/sodium/codecs.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/sodium/core.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/sodium/runtime.c.o
Compiling .pioenvs/sc01-plus-1/lib761/libsodium/sodium/utils.c.o
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/openssl/cipher-aesgcm.c.o
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/ref/cipher-aesgcm.c.o
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/ref/cipher-chachapoly.c.o
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/ref/dh-curve25519.c.o
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/ref/hash-blake2b.c.o
Archiving .pioenvs/sc01-plus-1/lib761/libsodium.a
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/ref/hash-blake2s.c.o
Compiling .pioenvs/sc01-plus-1/lib5f8/noise-c/backend/ref/hash-sha256.c.o
*** [.pioenvs/sc01-plus-1/src/main.cpp.o] Error 1
========================= [FAILED] Took 20.47 seconds =========================
  SCREEN_MAIN: master
  SCREEN_ROOMS: rooms
  SCREEN_KITCHEN: sliders
  SCREEN_LED: led
  SCREEN_SOLAR: solar
  SCREEN_LIGHTS: lights

esphome:
  name: sc01-plus-1
  friendly_name: SC01-Plus-1
  # In this way, custom partitions can be configured and flushed (not over OTA!)
#  platformio_options:
#    board_upload.maximum_ram_size: 327680
#    board_upload.maximum_size: 16777216
#    board_build.partitions: "../../../custom_partitions_3584.csv"
  includes:
    - bthome_ble_custom.h

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino
  flash_size: 16MB

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "xxxxx"

ota:
  - platform: esphome
    password: "xxx"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Sc01-Plus-1 Fallback Hotspot"
    password: "xxx"

external_components:
  - source:
      type: git
      url: https://github.com/strange-v/ha_deck
      ref: main
    components: [ hd_device_sc01_plus, ha_deck ]


web_server:
  port: 80

time:
  - platform: sntp
    id: sntp_time
    timezone: Pacific/Auckland
    on_time:
      - cron: '* * * * * *'
        then:
          lambda: |-
            char buff[10] = "-";
            auto time = id(sntp_time).now();
            if (time.is_valid())
              sprintf(buff, "%02d:%02d:%02d", time.hour, time.minute, time.second);
            id(local_time).set_value(std::string(buff));

# Enable BLE
esp32_ble:

one_wire:
  - platform: gpio
    pin: GPIO12

switch:
  - platform: output 
    name: 'SC01-1 Buzzer'
    id: sc01_1_buzzer
    output: buzzer_output
    on_turn_on: 
      then:
        - output.turn_on: buzzer_output
        - output.ledc.set_frequency:
            id: buzzer_output
            frequency: "1000Hz"
        - output.set_level:
            id: buzzer_output
            level: "50%"

    on_turn_off:
      then:
        - output.turn_off: buzzer_output

sensor:
  - platform: dallas_temp
    name: SC01-1 Temperature
    id: sc01_1_temp
    update_interval: 120s
    filters:
           - calibrate_linear:
               method: least_squares
               datapoints:
                 - 0.0  -> 0.0
                 - 23.0 -> 24.0
    on_value:
      then:
            - lambda: |-
                 BTHomeAdvertiser::broadcast_temperature(id(sc01_1_temp).state);
            - logger.log: "#####################"
            - logger.log: id(sc01_1_temp).state

  - platform: homeassistant
    entity_id: sensor.outside_temperature
    id: outside_temperature_sensor
    internal: true

  - platform: homeassistant
    entity_id: sensor.28372f8cb98c_ac_home
    id: inside_temperature_sensor
    internal: true

  - platform: homeassistant
    entity_id: sensor.28372f8cb98c_ac_target
    id: heatpump_target_temperature_sensor
    internal: true   

#North Solar
#sensor.esp8266_modbus_phase_1_current_watts
  - platform: homeassistant
    entity_id: sensor.esp8266_modbus_phase_1_current_watts
    id: modbus_phase_1_current_watts
    internal: true  
#sensor.esp8266_modbus_phase_2_current_watts
  - platform: homeassistant
    entity_id: sensor.esp8266_modbus_phase_2_current_watts
    id: modbus_phase_2_current_watts
    internal: true  
#sensor.esp8266_modbus_phase_3_current_watts
  - platform: homeassistant
    entity_id: sensor.esp8266_modbus_phase_3_current_watts
    id: modbus_phase_3_current_watts
    internal: true  

#South solar
#sensor.esp8266_modbus_fronius_phase_1_current_watts
  - platform: homeassistant
    entity_id: sensor.esp8266_modbus_fronius_phase_1_current_watts
    id: modbus_fronius_phase_1_current_watts
    internal: true  
#sensor.esp8266_modbus_fronius_phase_2_current_watts
  - platform: homeassistant
    entity_id: sensor.esp8266_modbus_fronius_phase_2_current_watts
    id: modbus_fronius_phase_2_current_watts
    internal: true  

#Total Solar
#sensor.phase_1_total_solar_power
  - platform: homeassistant
    entity_id: sensor.phase_1_total_solar_power
    id: p_1_total_solar_power
    internal: true  
#sensor.phase_2_total_solar_power
  - platform: homeassistant
    entity_id: sensor.phase_2_total_solar_power
    id: p_2_total_solar_power
    internal: true  
#sensor.phase_3_total_solar_power
  - platform: homeassistant
    entity_id: sensor.phase_3_total_solar_power
    id: p_3_total_solar_power
    internal: true  

#Grid:
#sensor.paladin_p1
  - platform: homeassistant
    entity_id: sensor.paladin_p1
    id: p_p1
    internal: true  
#sensor.phase_2
  - platform: homeassistant
    entity_id: sensor.phase_2
    id: p_2
    internal: true  
#sensor.phase_3
  - platform: homeassistant
    entity_id: sensor.phase_3
    id: p_3
    internal: true  


text_sensor:
  - platform: homeassistant
    entity_id: sensor.heat_pump_mode
    id: heatpump_mode_sensor
    internal: true      

  - platform: homeassistant
    entity_id: sensor.heat_pump_status
    id: heatpump_status
    internal: true 

number:
  - platform: template
    id: screen_brightness
    name: Active screen brightness
    min_value: 0
    max_value: 100
    step: 5
    initial_value: 75
    restore_value: true
    set_action:
      - lambda: |-
          if (!id(deck).get_inactivity())
            id(device).set_brightness(x);
  - platform: template
    id: inactive_screen_brightness
    name: Inactive screen brightness
    min_value: 0
    max_value: 100
    step: 5
    initial_value: 60
    restore_value: true
    set_action:
      - lambda: |-
          if (id(deck).get_inactivity())
            id(device).set_brightness(x);

output:
  - platform: ledc
    pin: 10
    id: out_10

  - platform: ledc
    pin: GPIO13
    id: buzzer_output





light:
  - platform: monochromatic
    id: dummy_light
    name: Dummy
    output: out_10

  - platform: status_led
    name: "SC01 Plus 1 Blue LED"
    pin: GPIO11   
    id: sc01_plus_1_blue_led


hd_device_sc01_plus:
  id: device
  brightness: 75

ha_deck:
  id: deck
  main_screen: ${SCREEN_MAIN}
  inactivity:
    period: 60 # seconds      dummy_temperature_sensor   sensor.meteobridge_air_temperature
    blank_screen: false
  on_inactivity_change:
    lambda:  |-
      if (x) {
        id(device).set_brightness(id(inactive_screen_brightness).state);
      } else {
        id(device).set_brightness(id(screen_brightness).state);
      }
  screens:
    - name: ${SCREEN_MAIN}
      widgets:
        - type: value-card
          id: local_time
          position: 8, 8
          dimensions: 228x96
          text: "Lincoln (New Zealand)"
          enabled: return true;
          on_click:
            - logger.log: "Time clicked"
            - logger.log:
                 format: "The heatpump mode is:  %s"
                 args: [ 'id(heatpump_mode_sensor).state.c_str()' ] 
            - light.turn_on:
                 id: sc01_plus_1_blue_led
            - lambda: |-
                id(deck).switch_screen("$SCREEN_SOLAR");
            - delay: 2s
            - light.turn_off:
                 id: sc01_plus_1_blue_led  

        - type: value-card
          id: inside_temperature
          position: 126, 112
          text: Inside
          icon: 󰔏
          unit: °C
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", (id(sc01_1_temp).state) - 1.0);
            return std::string(buff);



        - type: value-card
          id: outside_temperature
          position: 8, 112
          text: Outside
          icon: 󰔏
          unit: °C
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(outside_temperature_sensor).state);
            return std::string(buff);

        - type: value-card
          id: heatpump_temperature
          position: 126, 216
          text: Target
          icon: 󰀃
          unit: °C
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(heatpump_target_temperature_sensor).state);
            return std::string(buff);

####                              heat_pump_target_temperature
        - type: button
          position: 244, 8
          text: Set 16
          icon: 󰫗
#          toggle: true
          enabled: return true;
#          checked: |-
#            return id(dummy_light).current_values.is_on();
          on_click:
            then:
              - homeassistant.service:
                  service: script.set_heat_pump_16
          on_long_press:
            - logger.log: "Set 16 long pressed"
            - light.turn_on:
                 id: dummy_light
                 brightness: 50%
            - delay: 2s
            - light.turn_off:
                 id: dummy_light

####                                heat_pump_target_temperature
        - type: button
          position: 362, 8
          text: Set 23
          icon: 󰐸
#          toggle: true
          enabled: return true;
#          checked: |-
#            return id(dummy_light).current_values.is_on();
          on_click:
            then:
              - homeassistant.service:
                  service: script.set_heat_pump_23
          on_long_press:
            - logger.log: "Set 23 long pressed"      

        - type: value-card
          id: heatpump_mode
          position: 244, 112
          text: Currently
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%s", id(heatpump_mode_sensor).state.c_str());
            return std::string(buff);

        - type: value-card
          id: heatpump_state
          position: 362, 112
          text: State
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%s", id(heatpump_status).state.c_str());
            return std::string(buff);




####                        select.heat_pump_hvac
        - type: button
          position: 244, 216
          text: Mode
          icon: 󱍒
#          toggle: true
          enabled: return true;
          on_click:
            then:
              - homeassistant.service:
                  service: script.heat_pump_mode_toggle
          on_long_press:
            - logger.log: "Mode toggle long pressed"

####                      switch.heat_pump_power
        - type: button
          position: 362, 216
          text: POWER
          icon: 󰐥
          enabled: return true;
          on_click:          
            then:
              - light.turn_on:
                 id: sc01_plus_1_blue_led

              - homeassistant.service:
                  service: switch.toggle
                  data:
                    entity_id: switch.heat_pump_power

              - delay: 2s

              - light.turn_off:
                 id: sc01_plus_1_blue_led   
                                                      
          on_long_press:
            - logger.log: "Power long pressed"

#          on_turn_on:
#             - homeassistant.service:
#                 service: switch.toggle
#                 data:
#                   entity_id: switch.heat_pump_power
#          on_turn_off:
#             - homeassistant.service:
#                 service: switch.toggle
#                 data:
#                   entity_id: switch.heat_pump_power            



        - type: button
          position: 8, 216
          text: Brightness
          icon: 󰖨
          enabled: return true;
          on_click:
            lambda: id(deck).switch_screen("$SCREEN_LED");
          on_long_press:
            - logger.log: "Brightness Button Long Pressed"
            - light.turn_on:
                 id: dummy_light
                 brightness: 50%
            - lambda: |-
                id(deck).switch_screen("$SCREEN_LIGHTS");                 
            - delay: 2s
            - light.turn_off:
                 id: dummy_light


    - name: ${SCREEN_ROOMS}
      widgets:
        - type: button
          position: 8, 8
          icon: 󰁍
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 126, 8
          text: "Living Room"
          icon: 󰒹
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 244, 8
          text: "Main Bedroom"
          icon: 󰿒
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 362, 8
          text: "Kids Bedroom"
          icon: 󰢠
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 8, 112
          text: "Kitchen"
          icon: 󰩰
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 126, 112
          text: "Bathroom"
          icon: 󰦠
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 244, 112
          text: "Toilet"
          icon: 󰦫
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 362, 112
          text: "Corridor"
          icon: 󰾑
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");
        - type: button
          position: 8, 216
          text: "Hallway"
          icon: 󰷺
          enabled: |-
            return true;
          on_click:
            then:
            - lambda: |-
                id(deck).switch_screen("$SCREEN_MAIN");

                
    - name: ${SCREEN_LED}
      widgets:
        - type: button
          position: 0, 0
          dimensions: 48x320
          icon: 󰅁
          enabled: return true;
          on_click:
            - lambda: id(deck).switch_screen("$SCREEN_MAIN");
        - type: slider
          position: 200, 8
          dimensions: 100x304
          text: Brightness
          min: 0
          max: 100
          enabled: return true;
          value: return id(device).get_brightness();
          on_change:
            lambda: id(device).set_brightness(x);


    - name: ${SCREEN_LIGHTS}
      widgets:
        - type: button
          position: 0, 0
          dimensions: 48x320
          icon: 󰅁
          enabled: return true;
          on_click:
            - lambda: id(deck).switch_screen("$SCREEN_MAIN");   

        - type: button
          position: 52, 4
          dimensions: 104x100
          text: Sofa Light
          icon: 󰐥
#          toggle: true
          enabled: return true;
          on_click:           
            then:
              - light.turn_on:
                 id: sc01_plus_1_blue_led
              - homeassistant.service:
                  service: light.toggle
                  data:
                    entity_id: light.light_main_notification_light
              - delay: 2s
              - light.turn_off:
                 id: sc01_plus_1_blue_led                                                 
          on_long_press:
            - logger.log: "Sofa Light long pressed"


        - type: button
          position: 52, 108
          dimensions: 104x100
          text: Table Light
          icon: 󰐥
#          toggle: true
          enabled: return true;
          on_click:           
            then:
              - light.turn_on:
                 id: sc01_plus_1_blue_led
              - homeassistant.service:
                  service: light.toggle
                  data:
                    entity_id: light.light_sewing_notification_light
              - delay: 2s
              - light.turn_off:
                 id: sc01_plus_1_blue_led                                                 
          on_long_press:
            - logger.log: "Table Light long pressed"

####################################################################

    - name: ${SCREEN_SOLAR}
      widgets:
        - type: button
          position: 0, 0
          dimensions: 48x320
          icon: 󰅁
          enabled: return true;
          on_click:
            - lambda: id(deck).switch_screen("$SCREEN_MAIN");        
#################################################################      8 accross  
        - type: value-card
          id: solar_summary
          position: 8, 4
          dimensions: 104x56
          text: "Solar"
          icon: 󰩲
          enabled: return true;  

        - type: value-card
          id: north_solar
          position: 8, 68
          dimensions: 104x56
          text: "North Solar"
          enabled: return true;  

        - type: value-card
          id: south_solar
          position: 8, 136
          dimensions: 104x56
          text: "South Solar"
          enabled: return true;  

        - type: value-card
          id: total_solar
          position: 8, 204
          dimensions: 104x56
          text: "Total Solar"
          enabled: return true;

        - type: value-card
          id: grid
          position: 8, 272
          dimensions: 104x56
          text: "GRID"
          icon: 󰴾
          enabled: return true;
######################################################################### next 128 accross
        - type: value-card
          id: p1
          position: 128, 4
          dimensions: 104x56
          text: Phase 1
          icon: 󱤬
          enabled: return true;
         
        - type: value-card
          id: north_solar_production_p1
          position: 128, 68
          dimensions: 104x56
#          text: North
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(modbus_phase_1_current_watts).state);
            return std::string(buff); 

        - type: value-card
          id: south_solar_production_p1
          position: 128, 136
          dimensions: 104x56
#          text: South
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(modbus_fronius_phase_1_current_watts).state);
            return std::string(buff); 

        - type: value-card
          id: total_solar_production_p1
          position: 128, 204
          dimensions: 104x56
#          text: Total
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(p_1_total_solar_power).state);
            return std::string(buff); 

        - type: value-card
          id: grid_p1
          position: 128, 272
          dimensions: 104x56
#          text: Grid
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(p_p1).state);
            return std::string(buff);

######################################################################### next 248 accross
        - type: value-card
          id: p2
          position: 248, 4
          dimensions: 104x56
          text: Phase 2
          icon: 󱤬
          enabled: return true;
         
        - type: value-card
          id: north_solar_production_p2
          position: 248, 68
          dimensions: 104x56
#          text: North
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(modbus_phase_2_current_watts).state);
            return std::string(buff); 

        - type: value-card
          id: south_solar_production_p2
          position: 248, 136
          dimensions: 104x56
#          text: South
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(modbus_fronius_phase_2_current_watts).state);
            return std::string(buff); 

        - type: value-card
          id: total_solar_production_p2
          position: 248, 204
          dimensions: 104x56
#          text: Total
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(p_2_total_solar_power).state);
            return std::string(buff); 

        - type: value-card
          id: grid_p2
          position: 248, 272
          dimensions: 104x56
#          text: Grid
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(p_2).state);
            return std::string(buff);

######################################################################### next 368 accross
        - type: value-card
          id: p3
          position: 368, 4
          dimensions: 104x56
          text: Phase 3
          icon: 󱤬
          enabled: return true;
         
        - type: value-card
          id: north_solar_production_p3
          position: 368, 68
          dimensions: 104x56
#          text: North
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(modbus_phase_3_current_watts).state);
            return std::string(buff); 

        - type: value-card
          id: south_solar_production_p3
          position: 368, 136
          dimensions: 104x56
          text: --
#          icon: 󰣉
          enabled: return true;


        - type: value-card
          id: total_solar_production_p3
          position: 368, 204
          dimensions: 104x56
#          text: Total
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(p_3_total_solar_power).state);
            return std::string(buff); 

        - type: value-card
          id: grid_p3
          position: 368, 272
          dimensions: 104x56
#          text: Grid
#          icon: 󰣉
          enabled: return true;
          value: |-
            char buff[10] = "-";
            sprintf(buff, "%.1f", id(p_3).state);
            return std::string(buff);

How well can this screen be used in bright sunlight?

Hello!
Were you able to resolve this?
I am considering buying a few from aliexpress but wanted to ensure that they will still work of course.

It works fine - the errors in the earlier post are nothing to do with the display or board.

1 Like