Integration with Sunbean WIFI Heated Mattress Pad

Just wanted to pass on my thanks to all who have contributed to this thread. I’m still working through some of the idiosyncrasies (like pre-heat vs on vs power level) BUT good Lord you saved me years!

I’m not seeing anything with a bit of searching showing ESPHome supporting the WBR3. Everything i’m seeing still requires replacing the WBR3 with an ESP. Any links?

Edit: Found a pull request that hasn’t been approved @ LibreTiny/RTL8710CM, etc. by nmschulte · Pull Request #7861 · esphome/esphome · GitHub

https://docs.libretiny.eu/docs/status/supported/#tuya-inc

On this page the WBR3 has a little information icon next to it (unfortunately can’t copy/paste the text) that brings up a tool tip specifying you can flash it as a generic-rtl8720cf-2mb-992k board, unless I misunderstand what the tool tip means.

Maybe this is out of date now, but when I try to install this through YAML, it complains about “platform: switch” and claims only “platform: binary sensor” is allowed.

Took me a bit to figure out the new formatting for local tuya template. And had to add a letter in front of the level numbers to avoid the “Failed to perform the action…” error.

Here’s a working template yaml config
Paste into a file located here:
/homeassistant/custom_components/localtuya/templates/Sunbeam_Bedding_Dual_-_S2.yaml

- switch:
    id: '1'
    friendly_name: Master Power
    entity_category: None
    restore_on_reconnect: false
    is_passive_entity: false
    platform: switch
- switch:
    id: '14'
    friendly_name: Side A Power
    entity_category: None
    restore_on_reconnect: false
    is_passive_entity: false
    platform: switch
- switch:
    id: '15'
    friendly_name: Side B Power
    entity_category: None
    restore_on_reconnect: false
    is_passive_entity: false
    platform: switch
- switch:
    id: '8'
    friendly_name: Master Preheat Power
    entity_category: None
    restore_on_reconnect: false
    is_passive_entity: false
    platform: switch
- switch:
    id: '24'
    friendly_name: Side A Preheat
    entity_category: None
    restore_on_reconnect: false
    is_passive_entity: false
    platform: switch
- switch:
    id: '25'
    friendly_name: Side B Preheat
    entity_category: None
    restore_on_reconnect: false
    is_passive_entity: false
    platform: switch
- select:
    id: '4'
    friendly_name: Master Heat Level
    entity_category: config
    select_options:
      level_1: L1
      level_2: L2
      level_3: L3
      level_4: L4
      level_5: L5
      level_6: L6
      level_7: L7
      level_8: L8
      level_9: L9
      level_10: L10
    restore_on_reconnect: false
    is_passive_entity: false
    platform: select
- select:
    id: '20'
    friendly_name: Side A Heat Level
    entity_category: config
    select_options:
      level_1: L1
      level_2: L2
      level_3: L3
      level_4: L4
      level_5: L5
      level_6: L6
      level_7: L7
      level_8: L8
      level_9: L9
      level_10: L10
    restore_on_reconnect: false
    is_passive_entity: false
    platform: select
- select:
    id: '21'
    friendly_name: Side B Heat Level
    entity_category: config
    select_options:
      level_1: L1
      level_2: L2
      level_3: L3
      level_4: L4
      level_5: L5
      level_6: L6
      level_7: L7
      level_8: L8
      level_9: L9
      level_10: L10
    restore_on_reconnect: false
    is_passive_entity: false
    platform: select
- select:
    id: '26'
    friendly_name: Side A Set Timer
    entity_category: config
    select_options:
      30m: 0.5 hours
      1h: 1 hour
      1h30m: 1.5 hours
      2h: 2 hours
      2h30m: 2.5 hours
      3h: 3 hours
      3h30m: 3.5 hours
      4h: 4 hours
      4h30m: 4.5 hours
      5h: 5 hours
      5h30m: 5.5 hours
      6h: 6 hours
      6h30m: 6.5 hours
      7h: 7 hours
      7h30m: 7.5 hours
      8h: 8 hours
      8h30m: 8.5 hours
      9h: 9 hours
      9h30m: 9.5 hours
      10h: 10 hours
      Stay_On: 24 hours
    restore_on_reconnect: false
    is_passive_entity: false
    platform: select
- select:
    id: '27'
    friendly_name: Side B Set Timer
    entity_category: config
    select_options:
      30m: 0.5 hours
      1h: 1 hour
      1h30m: 1.5 hours
      2h: 2 hours
      2h30m: 2.5 hours
      3h: 3 hours
      3h30m: 3.5 hours
      4h: 4 hours
      4h30m: 4.5 hours
      5h: 5 hours
      5h30m: 5.5 hours
      6h: 6 hours
      6h30m: 6.5 hours
      7h: 7 hours
      7h30m: 7.5 hours
      8h: 8 hours
      8h30m: 8.5 hours
      9h: 9 hours
      9h30m: 9.5 hours
      10h: 10 hours
      Stay_On: 24 hours
    restore_on_reconnect: false
    is_passive_entity: false
    platform: select
- sensor:
    id: '28'
    friendly_name: Side A Auto Off Timer
    entity_category: diagnostic
    unit_of_measurement: seconds
    platform: sensor
- sensor:
    id: '29'
    friendly_name: Side B Auto Off Timer
    entity_category: diagnostic
    unit_of_measurement: seconds
    platform: sensor

4 Likes

I just went through the process of adding an ESP-12 to the controller board and getting it working with ESPHome. I documented the process here if it helps anyone.

Important note: I found that the mains neutral is connected directly to the low voltage ground plane. So you must never plug the device in while connected to any external low voltage components, such as a UART adapter! I fried mine while trying to dump the config on the WBR3.

1 Like

Thank you @nevets27 , you saved me so much work!