Andre0512 / hon

Home Assistant integration for Haier hOn: support for Haier/Candy/Hoover home appliances like washing machines and air conditioners in 28 languages.
MIT License
1.29k stars 2.47k forks source link

Add Fan Mode value as sensor value #178

Closed debnetjm closed 7 months ago

debnetjm commented 8 months ago

Is your feature request related to a problem? Please describe. Fan Mode is only visible inside climate entity but not as a sensor.

Describe the solution you'd like Sensor entity with fan mode value.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Device Log

data:
  additional_data:
    dictionaryId: 274
  appliance:
    PK: user#eu-west-1:c9a44055-b7ff-4c5b-afb7-8d1e9a43d6ec
    SK: app#xx-xx-xx-xx-xx-xx
    SK_Secondary: AC#selfClean56#2023-08-01
    applianceId: xx-xx-xx-xx-xx-xx#1970-01-01T00:00:00.0Z
    applianceModelId: 1288
    applianceStatus: 1
    applianceTypeId: 11
    applianceTypeName: AC
    attributes:
      acuVersion: 0.0.0
      chipset: 1
      dictionaryId: 274
      eppParserSet: 1
      fwLabel: iotfw_epp
      idfVersion: 4.4.4
      kernelVersion: 10.4.3
      lang: it-IT
      uiVersion: 06.26.00
    brand: haier
    code: AABQQ0E0000
    connectivity: wifi|ble
    defaultWarrantyYears: 2
    eepromId: 41
    eepromName: no_eeprom
    enrollmentDate: 1970-01-01T00:00:00.0Z
    firstEnrollment: False
    firstEnrollmentTBC: False
    fwVersion: 5.15.0
    id: 1288
    lastSelfClean: 1970-01-01T00:00:00.0Z
    lastSelfClean56: 1970-01-01T00:00:00.0Z
    lastSelfPurify: 1970-01-01T00:00:00.0Z
    lastUpdate: 1970-01-01T00:00:00.0Z
    macAddress: xx-xx-xx-xx-xx-xx
    modelName: AS35XCAHRA
    nickName: Sypialnia
    purchaseDate: 1970-01-01T00:00:00.0Z
    sections:
      chatbot: True
      double_pairing_hidden: True
      epp_enabled: False
    series: x
    seriesVersion: x
    topics:
      publish:
      subscribe:
        - $aws/events/presence/disconnected/xx-xx-xx-xx-xx-xx
        - $aws/events/presence/connected/xx-xx-xx-xx-xx-xx
        - haier/things/xx-xx-xx-xx-xx-xx/event/appliancestatus/update
        - haier/things/xx-xx-xx-xx-xx-xx/event/discovery/update
    unitConfiguration: 1to1
  attributes:
    activity:
    commandHistory:
      command:
        ancillaryParameters:
          remoteActionable:
            category: general
            fixedValue: 1
            mandatory: 0
            typology: fixed
          remoteVisible:
            category: general
            fixedValue: 1
            mandatory: 0
            typology: fixed
        applianceOptions:
        applianceType: AC
        attributes:
          channel: mobileApp
          origin: standardProgram
        commandName: stopProgram
        device:
          appVersion: 2.3.12
          deviceModel: kona
          mobileId: 190d1301f4710fcf
          mobileOs: android
          osVersion: 33
        macAddress: xx-xx-xx-xx-xx-xx
        parameters:
          onOffStatus: 0
        programName: PROGRAMS.AC.IOT_AUTO
        timestamp: 1970-01-01T00:00:00.0Z
        transactionId: xx-xx-xx-xx-xx-xx_1970-01-01T00:00:00.0Z
      timestampAccepted: 1970-01-01T00:00:00.0Z
      timestampExecuted: 1970-01-01T00:00:00.0Z
    lastConnEvent:
      category: CONNECTED
      instantTime: 1970-01-01T00:00:00.0Z
      macAddress: xx-xx-xx-xx-xx-xx
      timestampEvent: 1709265727700
    parameters:
      10degreeHeatingStatus: 0
      acType: 0
      airQuality: 0
      ch2oCleaningStatus: 1
      ch2oValueIndoor: 0
      co2ValueIndoor: 0
      compressorCurrent: 51.10
      compressorFrequency: 0
      compressorStatus: 0
      debugEnabled: 0
      defrostStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      electricHeatingStatusIndoor: 0
      energySavePeriod: 15
      energySavingStatus: 0
      errAckFlag: 0
      errCode: 0
      errors: 00
      expansionValveOpenDegree: 480
      fanStatusIndoor: 0
      fanStatusOutdoor: 2
      filterChangeStatusLocal: 0
      fourWayValveStatus: 2
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 1
      heatAccumulationStatus: 0
      highTransRate: 1
      humanSensingStatus: 0
      humidificationStatus: 0
      humidityIndoor: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 2
      machineModeHK: 0
      muteStatus: 0
      onOffStatus: 0
      operationSource: 1
      pm2p5CleaningStatus: 1
      pm2p5LevelIndoor: 0
      pm2p5ValueIndoor: 0
      pm2p5ValueOutdoor: 0
      pmvStatus: 0
      power: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      sensingResult: 0
      silentSleepStatus: 0
      specialMode: 0
      statusSyncRate: 1440
      stdTransRate: 3600
      tempAirOutdoor: 20
      tempCoilerIndoor: 22.00
      tempCoilerOutdoor: 7
      tempDefrostOutdoor: -64
      tempInAirOutdoor: -64
      tempIndoor: 23.00
      tempOutdoor: 7.00
      tempSel: 21.00
      tempUnit: 0
      totalElectricityUsed: 0
      totalWorkTime: 0
      transMode: 0
      vocValueIndoor: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
    resultCode: 0
  settings:
    ancillaryParameters:
      programRules: {'selfCleaningStatus': {'$installationType': {'1toN': {'typology': 'fixed', 'fixedValue': '0'}}}, 'selfCleaning56Status': {'$installationType': {'1to2': {'typology': 'fixed', 'fixedValue': '0'}, '1toN': {'typology': 'fixed', 'fixedValue': '0'}}}}
      remoteActionable: 1
      remoteVisible: 1
    custom:
      category: setParameters
    parameters:
      10degreeHeatingStatus: 0
      ch2oCleaningStatus: 1
      cleaningTimeStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      energySavePeriod: 15
      energySavingStatus: 0
      filterChangeStatusCloud: 0
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 1
      heatAccumulationStatus: 0
      humanSensingStatus: 0
      humidificationStatus: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 2
      muteStatus: 0
      onOffStatus: 0
      operationName: grSetDAC
      pm2p5CleaningStatus: 1
      pmvStatus: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      silentSleepStatus: 0
      specialMode: 0
      tempSel: 21
      tempUnit: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
  startProgram:
    ancillaryParameters:
      programRules: {'selfCleaningStatus': {'$installationType': {'1toN': {'typology': 'fixed', 'fixedValue': '0'}}}, 'selfCleaning56Status': {'$installationType': {'1to2': {'typology': 'fixed', 'fixedValue': '0'}, '1toN': {'typology': 'fixed', 'fixedValue': '0'}}}}
      remoteActionable: 1
      remoteVisible: 0
    custom:
      program: iot_simple_start
    parameters:
      10degreeHeatingStatus: 0
      ch2oCleaningStatus: 0
      cleaningTimeStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      energySavePeriod: 15
      energySavingStatus: 0
      filterChangeStatusCloud: 0
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 0
      heatAccumulationStatus: 0
      humanSensingStatus: 0
      humidificationStatus: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 0
      muteStatus: 0
      onOffStatus: 1
      operationName: grSetDAC
      pm2p5CleaningStatus: 0
      pmvStatus: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      silentSleepStatus: 0
      specialMode: 0
      tempSel: 24
      tempUnit: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
  statistics:
    mostUsedPrograms:
    mostUsedRecipes:
    programsCounter: 0
  stopProgram:
    ancillaryParameters:
      remoteActionable: 1
      remoteVisible: 1
    parameters:
      10degreeHeatingStatus: 0
      ch2oCleaningStatus: 0
      cleaningTimeStatus: 0
      echoStatus: 0
      electricHeatingStatus: 0
      energySavePeriod: 15
      energySavingStatus: 0
      filterChangeStatusCloud: 0
      freshAirStatus: 0
      halfDegreeSettingStatus: 0
      healthMode: 0
      heatAccumulationStatus: 0
      humanSensingStatus: 0
      humidificationStatus: 0
      humiditySel: 30
      intelligenceStatus: 0
      lightStatus: 0
      lockStatus: 0
      machMode: 0
      muteStatus: 0
      onOffStatus: 0
      operationName: grSetDAC
      pm2p5CleaningStatus: 0
      pmvStatus: 0
      rapidMode: 0
      screenDisplayStatus: 1
      selfCleaning56Status: 0
      selfCleaningStatus: 0
      silentSleepStatus: 0
      specialMode: 0
      tempSel: 22
      tempUnit: 0
      voiceSignStatus: 0
      voiceStatus: 0
      windDirectionHorizontal: 0
      windDirectionVertical: 5
      windSensingStatus: 0
      windSpeed: 5
commands:
  settings:
    10degreeHeatingStatus:
      max: 1
      min: 0
      step: 1
    category:
      - setConfig
      - setParameters
    echoStatus:
      max: 1
      min: 0
      step: 1
    healthMode:
      - 0
      - 1
    humanSensingStatus:
      max: 3
      min: 0
      step: 1
    machMode:
      - 0
      - 1
      - 2
      - 4
      - 6
    muteStatus:
      max: 1
      min: 0
      step: 1
    rapidMode:
      max: 1
      min: 0
      step: 1
    screenDisplayStatus:
      max: 1
      min: 0
      step: 1
    selfCleaning56Status:
      max: 1
      min: 0
      step: 1
    selfCleaningStatus:
      max: 1
      min: 0
      step: 1
    silentSleepStatus:
      max: 1
      min: 0
      step: 1
    tempSel:
      max: 30
      min: 16
      step: 1
    windDirectionHorizontal:
      - 0
      - 3
      - 4
      - 5
      - 6
      - 7
    windDirectionVertical:
      - 2
      - 4
      - 5
      - 6
      - 7
      - 8
    windSpeed:
      - 1
      - 2
      - 3
      - 5
  startProgram:
    10degreeHeatingStatus:
      max: 1
      min: 0
      step: 1
    echoStatus:
      max: 1
      min: 0
      step: 1
    ecoMode:
      max: 1
      min: 0
      step: 1
    healthMode:
      - 0
      - 1
    humanSensingStatus:
      max: 3
      min: 0
      step: 1
    machMode:
      - 0
      - 1
      - 2
      - 4
      - 6
    muteStatus:
      max: 1
      min: 0
      step: 1
    program:
      - UV + ch + dzien
      - iot_10_heating
      - iot_auto
      - iot_cool
      - iot_dry
      - iot_fan
      - iot_heat
      - iot_self_clean
      - iot_self_clean_56
      - iot_simple_start
      - iot_uv
      - iot_uv_and_auto
      - iot_uv_and_cool
      - iot_uv_and_dry
      - iot_uv_and_fan
      - iot_uv_and_heat
    programFamily:
      - maintenance
      - health
      - maintenance_health
    rapidMode:
      max: 1
      min: 0
      step: 1
    remoteActionable:
      max: 1
      min: 0
      step: 1
    remoteVisible:
      max: 1
      min: 0
      step: 1
    screenDisplayStatus:
      max: 1
      min: 0
      step: 1
    selfCleaning56Status:
      max: 1
      min: 0
      step: 1
    selfCleaningStatus:
      max: 1
      min: 0
      step: 1
    silentSleepStatus:
      max: 1
      min: 0
      step: 1
    tempSel:
      max: 30
      min: 16
      step: 1
    windDirectionHorizontal:
      - 0
      - 3
      - 4
      - 5
      - 6
      - 7
    windDirectionVertical:
      - 2
      - 4
      - 5
      - 6
      - 7
      - 8
    windSpeed:
      - 1
      - 2
      - 3
      - 5
  stopProgram:
    10degreeHeatingStatus:
      max: 1
      min: 0
      step: 1
    echoStatus:
      max: 1
      min: 0
      step: 1
    healthMode:
      - 0
      - 1
    humanSensingStatus:
      max: 3
      min: 0
      step: 1
    machMode:
      - 0
      - 1
      - 2
      - 4
      - 6
    muteStatus:
      max: 1
      min: 0
      step: 1
    rapidMode:
      max: 1
      min: 0
      step: 1
    screenDisplayStatus:
      max: 1
      min: 0
      step: 1
    selfCleaning56Status:
      max: 1
      min: 0
      step: 1
    selfCleaningStatus:
      max: 1
      min: 0
      step: 1
    silentSleepStatus:
      max: 1
      min: 0
      step: 1
    tempSel:
      max: 30
      min: 16
      step: 1
    windDirectionHorizontal:
      - 0
      - 3
      - 4
      - 5
      - 6
      - 7
    windDirectionVertical:
      - 2
      - 4
      - 5
      - 6
      - 7
      - 8
    windSpeed:
      - 1
      - 2
      - 3
      - 5
rules:
  startProgram:
    ecoMode:
      1:
        machMode:
          1:
            tempSel: 26
            windDirectionHorizontal: 4
            windDirectionVertical: 3
            windSpeed: 5
          4:
            tempSel: 20
            windDirectionHorizontal: 4
            windDirectionVertical: 3
            windSpeed: 5
versions:
  hon: 0.11.0-beta.1
  pyhOn: 0.16.0
Andre0512 commented 7 months ago

Hi, it would be redundant to create an extra sensor for this. I know we have some redundancies in other places, but I think we should reduce this. If you really want to create an extra sensor for the fan mode, add something like this to your config:


  - platform: template
    sensors:
      fan_mode:
        friendly_name: Fan Mode
        value_template: "{{ states.climate.<climate_entity_name>.attributes.fan_mode }}"```