tuya/tuya-home-assistant

Proscenic A9 purifier support not functioning correctly

Open

#727 aperta il 9 dic 2021

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari) (206 fork)github user discovery
enhancementhelp wanted

Metriche repository

Star
 (960 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

I'm having issue with my air purifier support. I only get four entities in HA: fan.a9, switch.a9_child_lock, switch.a9_filter_cartridge_reset, and switch.a9_power. Nothing about the air quality or the other info available via the Tuya IoT cloud. However, the bigger problem is that the power status is not reported correctly. I can use the switch to turn the purifier on, but in HA, the switch resets to off after a few seconds and the state shows as unavailable.

Device normal info

  • Proscenic
  • A9

Device info

{
  "result": {
    "active_time": 1637763360,
    "biz_type": 0,
    "category": "kj",
    "create_time": 1614036229,
    "icon": "smart/icon/ay1533718828917HNmxD/538907f85c58eed4490ad81ded112c55.png",
    "id": "xxxxxxxx",
    "ip": "xxxxxxxx",
    "lat": "xxxxxxxx",
    "local_key": "xxxxxxxx",
    "lon": "xxxxxxxx",
    "name": "A9",
    "online": true,
    "owner_id": "xxxxxxxx",
    "product_id": "giwqfeiezesbkkbe",
    "product_name": "A9",
    "status": [
      {
        "code": "switch",
        "value": true
      },
      {
        "code": "pm25",
        "value": 5
      },
      {
        "code": "filter",
        "value": 41
      },
      {
        "code": "lock",
        "value": false
      },
      {
        "code": "light",
        "value": false
      },
      {
        "code": "filter_reset",
        "value": true
      },
      {
        "code": "filter_days",
        "value": 1257
      },
      {
        "code": "total_time",
        "value": 0
      },
      {
        "code": "total_pm",
        "value": 0
      },
      {
        "code": "air_quality",
        "value": "mild"
      },
      {
        "code": "fault",
        "value": 0
      }
    ],
    "sub": false,
    "time_zone": "-05:00",
    "uid": "xxxxxxxx",
    "update_time": 1638640760,
    "uuid": "xxxxxxxx"
  },
  "success": true,
  "t": 1639063338759
}

Device specifications

{
  "result": {
    "category": "kj",
    "functions": [
      {
        "code": "switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "lock",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "light",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_reset",
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "pm25",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":0,\"max\":999,\"scale\":0,\"step\":1}"
      },
      {
        "code": "filter",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "lock",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "light",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_reset",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "filter_days",
        "type": "Integer",
        "values": "{\"unit\":\"h\",\"min\":0,\"max\":3000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "total_time",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":5256000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "total_pm",
        "type": "Integer",
        "values": "{\"unit\":\"mg\",\"min\":0,\"max\":10000000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "air_quality",
        "type": "Enum",
        "values": "{\"range\":[\"great\",\"mild\",\"good\",\"medium\",\"severe\"]}"
      },
      {
        "code": "fault",
        "type": "Bitmap",
        "values": "{\"label\":[\"e1\",\"e2\"]}"
      }
    ]
  },
  "success": true,
  "t": 1639063367353
}

Guida contributor