<commit_before>"use strict";
var Wunderground = require('wundergroundnode');
var inherits = require('util').inherits;
var Service, Characteristic;

var weatherStationService;

var WeatherCondition;
var WeatherConditionCategory;
var Rain1h;
var Rain24h;
var WindDirection;
var WindSpeed;
var AirPressure;
var Visibility;
var UVIndex;
var MeasuringStation;

var CustomUUID = {
	// Eve
	AirPressure: 'E863F10F-079E-48FF-8F27-9C2605A29F52',
	// Other
	WindSpeed: '49C8AE5A-A3A5-41AB-BF1F-12D5654F9F41',
	// Weather Station
	WeatherCondition: 'cd65a9ab-85ad-494a-b2bd-2f380084134d',
	WeatherConditionCategory: 'cd65a9ab-85ad-494a-b2bd-2f380084134c',
	// Weather Station Extended
	Rain1h: '10c88f40-7ec4-478c-8d5a-bd0c3cce14b7',
	Rain24h: 'ccc04890-565b-4376-b39a-3113341d9e0f',
	WindDirection: '46f1284c-1912-421b-82f5-eb75008b167e',
	Visibility: 'd24ecc1e-6fad-4fb5-8137-5af88bd5e857',
	UVIndex: '05ba0fe0-b848-4226-906d-5b64272e05ce',
	MeasuringStation: 'd1b2787d-1fc4-4345-a20e-7b5a74d693ed',
};

var CustomCharacteristic = {
	WeatherCondition,
	WeatherConditionCategory,
	Rain1h,
	Rain24h,
	WindDirection,
	WindSpeed,
	AirPressure,
	Visibility,
	UVIndex,
	MeasuringStation,
};

module.exports = function (homebridge) {
	Service = homebridge.hap.Service;
	Characteristic = homebridge.hap.Characteristic;
	homebridge.registerAccessory("homebridge-wunderground-extended", "WUWeatherStationExtended", WUWeatherStationExtended);

	CustomCharacteristic.WeatherConditionCategory = function() {
		Characteristic.call(this, 'Weather Condition Category', CustomUUID.WeatherConditionCategory);
		this.setProps({
			format: Characteristic.Formats.UINT8,
			maxValue: 3,
			minValue: 0,
			minStep: 1,
			perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
		});
		this.value = this.getDefaultValue();
	};
	inherits(CustomCharacteristic.WeatherConditionCategory, Characteristic);

	CustomCharacteristic.WeatherCondition = function() {
		Characteristic.call(this, 'Weather Condition', CustomUUID.WeatherCondition);
		this.setProps({
			format: Characteristic.Formats.STRING,
			perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
		});
		this.value = this.getDefaultValue();
	};
	inherits(CustomCharacteristic.WeatherCondition, Characteristic);

	CustomCharacteristic.Rain1h = function() {
		Characteristic.call(this, 'Rain last hour', CustomUUID.Rain1h);<commit_msg>Bugfixes<commit_after>"use strict";
var Wunderground = require('wundergroundnode');
var inherits = require('util').inherits;
var Service, Characteristic;

var weatherStationService;

var WeatherCondition;
var WeatherConditionCategory;
var Rain1h;
var Rain24h;
var WindDirection;
var WindSpeed;
var AirPressure;
var Visibility;
var UVIndex;
var MeasuringStation;

var CustomUUID = {
	// Eve
	AirPressure: 'E863F10F-079E-48FF-8F27-9C2605A29F52',
	// Other
	WindSpeed: '49C8AE5A-A3A5-41AB-BF1F-12D5654F9F41',
	// Weather Station
	WeatherCondition: 'cd65a9ab-85ad-494a-b2bd-2f380084134d',
	WeatherConditionCategory: 'cd65a9ab-85ad-494a-b2bd-2f380084134c',
	// Weather Station Extended
	Rain1h: '10c88f40-7ec4-478c-8d5a-bd0c3cce14b7',
	Rain24h: 'ccc04890-565b-4376-b39a-3113341d9e0f',
	WindDirection: '46f1284c-1912-421b-82f5-eb75008b167e',
	Visibility: 'd24ecc1e-6fad-4fb5-8137-5af88bd5e857',
	UVIndex: '05ba0fe0-b848-4226-906d-5b64272e05ce',
	MeasuringStation: 'd1b2787d-1fc4-4345-a20e-7b5a74d693ed',
};

var CustomCharacteristic = {};

module.exports = function (homebridge) {
	Service = homebridge.hap.Service;
	Characteristic = homebridge.hap.Characteristic;
	homebridge.registerAccessory("homebridge-wunderground-extended", "WUWeatherStationExtended", WUWeatherStationExtended);

	CustomCharacteristic.WeatherConditionCategory = function() {
		Characteristic.call(this, 'Weather Condition Category', CustomUUID.WeatherConditionCategory);
		this.setProps({
			format: Characteristic.Formats.UINT8,
			maxValue: 3,
			minValue: 0,
			minStep: 1,
			perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
		});
		this.value = this.getDefaultValue();
	};
	inherits(CustomCharacteristic.WeatherConditionCategory, Characteristic);

	CustomCharacteristic.WeatherCondition = function() {
		Characteristic.call(this, 'Weather Condition', CustomUUID.WeatherCondition);
		this.setProps({
			format: Characteristic.Formats.STRING,
			perms: [Characteristic.Perms.READ, Characteristic.Perms.NOTIFY]
		});
		this.value = this.getDefaultValue();
	};
	inherits(CustomCharacteristic.WeatherCondition, Characteristic);

	CustomCharacteristic.Rain1h = function() {
		Characteristic.call(this, 'Rain last hour', CustomUUID.Rain1h);
{'fraction_non_alphanumeric': 0.11659778116162715, 'fraction_numerical': 0.09375679791168152, 'mean_word_length': 6.321656050955414, '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': '1928039', 'n_tokens_mistral': 1964, 'n_tokens_neox': 1695, 'n_words': 249}