ebaauw / homebridge-lib

Utility Library for Homebridge Plugins
Apache License 2.0
94 stars 12 forks source link

Small typos and issues in EveHomeKitTypes.js #29

Closed An00bIS47 closed 4 years ago

An00bIS47 commented 4 years ago

Hi @ebaauw

i have looked at the EveHomeKitTypes.js and there are some small typos and issues

    this.createCharacteristicClass(
      'ConditionCategory', 'CD65A9AB-85AD-494A-B2BD-2F380084134C', {
        format: this.Formats.UINT8,
        minValue: 0,
        maxValue: 1000,
        minStep: 1,
        perms: [this.Perms.READ, this.Perms.NOTIFY]
      }, 'Condition Category'
    )

The maxValue would exceed the UINT8 limit. I guess this should be an INT or UINT16. But I don't have an EVE device to verify this.

    this.createCharacteristicClass(
      'Ozone', 'BBEFFDDD-1BCD-4D75-B7CD-B57A90A04D13', {
        format: this.Formats.UINT8,
        unit: 'DU',
        minValue: 0,
        maxValue: 500,
        minStep: 1,
        perms: [this.Perms.READ, this.Perms.NOTIFY]
      }, 'Clouds'
    )

Here it is the same as above plus the 'Clouds' should be replaced with Ozone

    this.createCharacteristicClass(
      'RainProbabiliy', 'FC01B24F-CF7E-4A74-90DB-1B427AF1FFA3', {
        format: this.Formats.UINT8,
        unit: this.Units.PERCENTAGE,
        minValue: 0,
        maxValue: 100,
        minStep: 1,
        perms: [this.Perms.READ, this.Perms.NOTIFY]
      }, 'Rain Probabiliy'
    )

Here you missed a 'T' in Probabiliy

ebaauw commented 4 years ago

Thanks. I copied these from somewhere, and never checked the UINT8 limit. These characteristics aren’t defined by Eve, and aren’t used in any Eve devices. They are however recognised by the Eve app and come with a associated symbol.

I’m using ConditionCategory in Homebridge WS, and it currently happily reports value 802. I suppose Eve will be happy with any numeric type (I think the value is sent as json anyway). I don’t think OpenWeatherMap provides Ozone or Rain probability, so I haven’t been using these myself.

ebaauw commented 4 years ago

In v4.8.0.