Clothes Dryer Automations

So I have some esphome code. I fully intend to replace it with something home-rolled later, but I made the mistake of buying the SmartDry, I might as well use it. The device simply announces it’s data over BLE, so:

esp32_ble_tracker:
  on_ble_manufacturer_data_advertise:
    - manufacturer_id: "01AE"
      then:
        - lambda: |-
            id(raw_sensor).publish_state(format_hex(x));
            uint32_t hum = x[0] + (x[1] << 8) + (x[2] << 16) + (x[3] << 24);
            uint32_t temp = x[4] + (x[5] << 8) + (x[6] << 16) + (x[7] << 24);
            uint16_t shake = x[8] + (x[9] << 8);
            uint8_t batt = x[10];
            uint8_t wake = x[11];
            id(hum_sensor).publish_state(hum);
            id(temp_sensor).publish_state(temp);
            id(shake_sensor).publish_state(shake);
            id(batt_sensor).publish_state(batt);
            id(wake_sensor).publish_state(wake);

sensor:
  - platform: template
    name: "SmartDry Temperature"
    device_class: 'temperature'
    accuracy_decimals: 4
    id: temp_sensor
  - platform: template
    name: "SmartDry Humidity"
    device_class: 'humidity'
    accuracy_decimals: 4
    id: hum_sensor
  - platform: template
    name: "SmartDry Shake"
    id: shake_sensor
  - platform: template
    name: "SmartDry Battery"
    id: batt_sensor
  - platform: template
    name: "SmartDry Awake"
    id: wake_sensor
text_sensor:
  - platform: template
    name: "SmartDry Raw"
    id: raw_sensor

I can’t for the life of me figure out how the temp and humidity relate to real world measurements (I’m not even sure I haven’t swapped them), but the shake one seems to be correct, so I just monitor that and when it drops below 10 I have Alexa make an announcement.

4 Likes