arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

Characteristic.StatusTampered is type UINT8 but mqttthing treats it as boolean #631

Open maxlinear8 opened 1 year ago

maxlinear8 commented 1 year ago

This causes tamper status to not be reflected correctly in HomeKit.

See https://github.com/homebridge/HAP-NodeJS/blob/b34cc46/src/lib/definitions/CharacteristicDefinitions.ts#L3874

arachnetech commented 11 months ago

The same issue applies to StatusFault:

export class StatusFault extends Characteristic {

  public static readonly UUID: string = "00000077-0000-1000-8000-0026BB765291";

  public static readonly NO_FAULT = 0;
  public static readonly GENERAL_FAULT = 1;

  constructor() {
    super("Status Fault", StatusFault.UUID, {
      format: Formats.UINT8,