<commit_before>var inherits = require('util').inherits;
var Armed;

module.exports = function (HAPnode, config, functions) {
    var Accessory = HAPnode.Accessory;
    var Service = HAPnode.Service;
    var Characteristic = HAPnode.Characteristic;
    var uuid = HAPnode.uuid;
    var debug = HAPnode.debug;

    // Armed = function () {
    //     Characteristic.call(this, 'Armed', '00000067-0000-1000-8000-0026BB816241');
    //     this.setProps({
    //         format: Characteristic.Formats.BOOL,
    //         perms: [Characteristic.Perms.READ, Characteristic.Perms.WRITE, Characteristic.Perms.NOTIFY]
    //     });
    //     this.value = this.getDefaultValue();
    // };
    // inherits(Armed, Characteristic);

    var module = {};

    module.newDevice = function (device) {

        var DeviceMap = [
          {
            name: 'MotionSensor',
            subcategory: 3,
            category: 4,
            battery: true,
            id: 'urn:micasaverde-com:serviceId:SecuritySensor1',
            characteristics: {
                MotionDetected: {
                  getVariable: 'armedtripped',
                  type: 'boolean'
                },
                StatusActive: true,
                StatusFault: {
                  getVariable: 'commFailure',
                  type: 'boolean'
                }
            }
          },
          {
            name: 'ContactSensor',
            subcategory: 1,
            category: 4,
            battery: true,
            id: 'urn:micasaverde-com:serviceId:SecuritySensor1',
            characteristics: {
                ContactSensorState: {
                  getVariable: 'tripped',
                  type: 'boolean'
                },
                StatusFault: {
                  getVariable: 'commFailure',
                  type: 'boolean'
                }
            }
          },
          {
            name: 'HumiditySensor',
            category: 16,
            subcategory: 0,
            battery: true,<commit_msg>fixing motion sensor, as tripped is fairly reliable on that type<commit_after>var inherits = require('util').inherits;
var Armed;

module.exports = function (HAPnode, config, functions) {
    var Accessory = HAPnode.Accessory;
    var Service = HAPnode.Service;
    var Characteristic = HAPnode.Characteristic;
    var uuid = HAPnode.uuid;
    var debug = HAPnode.debug;

    // Armed = function () {
    //     Characteristic.call(this, 'Armed', '00000067-0000-1000-8000-0026BB816241');
    //     this.setProps({
    //         format: Characteristic.Formats.BOOL,
    //         perms: [Characteristic.Perms.READ, Characteristic.Perms.WRITE, Characteristic.Perms.NOTIFY]
    //     });
    //     this.value = this.getDefaultValue();
    // };
    // inherits(Armed, Characteristic);

    var module = {};

    module.newDevice = function (device) {

        var DeviceMap = [
          {
            name: 'MotionSensor',
            subcategory: 3,
            category: 4,
            battery: true,
            id: 'urn:micasaverde-com:serviceId:SecuritySensor1',
            characteristics: {
                MotionDetected: {
                  getVariable: 'tripped',
                  type: 'boolean'
                },
                StatusActive: true,
                StatusFault: {
                  getVariable: 'commFailure',
                  type: 'boolean'
                }
            }
          },
          {
            name: 'ContactSensor',
            subcategory: 1,
            category: 4,
            battery: true,
            id: 'urn:micasaverde-com:serviceId:SecuritySensor1',
            characteristics: {
                ContactSensorState: {
                  getVariable: 'tripped',
                  type: 'boolean'
                },
                StatusFault: {
                  getVariable: 'commFailure',
                  type: 'boolean'
                }
            }
          },
          {
            name: 'HumiditySensor',
            category: 16,
            subcategory: 0,
            battery: true,
{'fraction_non_alphanumeric': 0.10612745098039215, 'fraction_numerical': 0.01911764705882353, 'mean_word_length': 1.379591836734694, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '614930', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1076, 'n_words': 209}