Skip to content

add Smartmi Fan 2 - zhimi.fan.za3 #85

@deviant-aut

Description

@deviant-aut

Smartmi Fan 2

Image

esphome boots with settings

esp32:
  board: esp32dev
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
    advanced:
      ignore_efuse_custom_mac: true
      ignore_efuse_mac_crc: true

untested config

fan:
  - platform: "miot"
    name: "Fan"
    state:
      miot_siid: 2
      miot_piid: 1
    speed:
      miot_siid: 2
      miot_piid: 6  # Stepless Fan Level 1-100 für za3
      min_value: 1
      max_value: 100
    oscillating:
      miot_siid: 2
      miot_piid: 3

switch:
  - platform: "miot"
    miot_siid: 5  # Indicator Light Service für za3
    miot_piid: 1  # Brightness (als Switch interpretiert)
    name: "Indicator Lights"
    icon: "mdi:lightbulb"
    entity_category: config
  - platform: "miot"
    miot_siid: 4  # Alarm Service für za3
    miot_piid: 1
    name: "Notification Sounds"
    icon: "mdi:volume-high"
    entity_category: config
  - platform: "miot"
    miot_siid: 3  # Physical Control Locked Service für za3
    miot_piid: 1
    name: "Child Lock"
    icon: "mdi:lock"
    entity_category: config

select:
  - platform: "miot"
    id: "mode"
    miot_siid: 2
    miot_piid: 5
    name: "Mode"
    icon: "mdi:leaf"
    options:
      0: "Straight Wind"
      1: "Natural Wind"
  - platform: "miot"
    miot_siid: 2
    miot_piid: 4  # horizontal-swing-included-angle für za3
    name: "Oscillation Angle"
    icon: "mdi:angle-obtuse"
    options:
      30: "30°"
      60: "60°"
      90: "90°"
      120: "120°"
  - platform: "miot"
    miot_siid: 5  # Indicator Light Service
    miot_piid: 1  # Brightness als Select
    name: "LED Brightness"
    icon: "mdi:brightness-6"
    options:
      0: "Normal"
      1: "Dim" 
      2: "Off"

number:
  - platform: "miot"
    miot_siid: 2
    miot_piid: 2  # Gear Fan Level 1-4 für za3
    name: "Fan Level"
    icon: "mdi:fan-chevron-up"
    min_value: 1
    max_value: 4
    step: 1
  - platform: "miot"
    miot_siid: 6  # Countdown Service für za3
    miot_piid: 1  # countdown-time (in Sekunden, umrechnen auf Minuten)
    name: "Off Delay"
    icon: "mdi:clock-outline"
    unit_of_measurement: "min"
    device_class: duration
    min_value: 0
    max_value: 480  # 28800 Sekunden = 480 Minuten
    step: 1

button:
  - platform: "miot"
    miot_siid: 2
    miot_aiid: 1  # turn-left action
    name: "Turn Left"
    icon: "mdi:pan-left"
  - platform: "miot"
    miot_siid: 2
    miot_aiid: 2  # turn-right action  
    name: "Turn Right"
    icon: "mdi:pan-right"

ToDo:
find UART Pins

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions