@riddix/hamh 2.1.0-alpha.700 → 2.1.0-alpha.701

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123791,6 +123791,13 @@ var init_water_heater = __esm({
123791
123791
  }
123792
123792
  });
123793
123793
 
123794
+ // ../common/dist/domains/weather.js
123795
+ var init_weather = __esm({
123796
+ "../common/dist/domains/weather.js"() {
123797
+ "use strict";
123798
+ }
123799
+ });
123800
+
123794
123801
  // ../common/dist/domains/index.js
123795
123802
  var init_domains = __esm({
123796
123803
  "../common/dist/domains/index.js"() {
@@ -123807,6 +123814,7 @@ var init_domains = __esm({
123807
123814
  init_sensor();
123808
123815
  init_vacuum();
123809
123816
  init_water_heater();
123817
+ init_weather();
123810
123818
  }
123811
123819
  });
123812
123820
 
@@ -123869,6 +123877,7 @@ var init_home_assistant_domain = __esm({
123869
123877
  HomeAssistantDomain2["vacuum"] = "vacuum";
123870
123878
  HomeAssistantDomain2["valve"] = "valve";
123871
123879
  HomeAssistantDomain2["water_heater"] = "water_heater";
123880
+ HomeAssistantDomain2["weather"] = "weather";
123872
123881
  })(HomeAssistantDomain || (HomeAssistantDomain = {}));
123873
123882
  }
123874
123883
  });
@@ -127326,6 +127335,7 @@ function matterApi(bridgeService, haRegistry) {
127326
127335
  "light",
127327
127336
  "switch",
127328
127337
  "sensor",
127338
+ "weather",
127329
127339
  "binary_sensor",
127330
127340
  "climate",
127331
127341
  "cover",
@@ -159504,6 +159514,54 @@ function WaterHeaterDevice(homeAssistantEntity) {
159504
159514
  });
159505
159515
  }
159506
159516
 
159517
+ // src/matter/endpoints/legacy/weather/weather-device.ts
159518
+ init_home_assistant_entity_behavior();
159519
+ var temperatureConfig5 = {
159520
+ getValue(entity, agent) {
159521
+ const fallbackUnit = agent.env.get(HomeAssistantConfig).unitSystem.temperature;
159522
+ const attributes7 = entity.attributes;
159523
+ const temperature3 = attributes7.temperature;
159524
+ if (temperature3 == null || Number.isNaN(temperature3)) {
159525
+ return void 0;
159526
+ }
159527
+ return Temperature.withUnit(
159528
+ temperature3,
159529
+ attributes7.temperature_unit ?? fallbackUnit
159530
+ );
159531
+ }
159532
+ };
159533
+ var humidityConfig5 = {
159534
+ getValue(entity) {
159535
+ const attributes7 = entity.attributes;
159536
+ const humidity = attributes7.humidity;
159537
+ if (humidity == null || Number.isNaN(humidity)) {
159538
+ return null;
159539
+ }
159540
+ return humidity;
159541
+ }
159542
+ };
159543
+ var pressureConfig4 = {
159544
+ getValue(entity) {
159545
+ const attributes7 = entity.attributes;
159546
+ const pressure = attributes7.pressure;
159547
+ if (pressure == null || Number.isNaN(pressure)) {
159548
+ return void 0;
159549
+ }
159550
+ return convertPressureToHpa(pressure, attributes7.pressure_unit);
159551
+ }
159552
+ };
159553
+ var WeatherSensorType = TemperatureSensorDevice.with(
159554
+ BasicInformationServer2,
159555
+ IdentifyServer2,
159556
+ HomeAssistantEntityBehavior,
159557
+ TemperatureMeasurementServer2(temperatureConfig5),
159558
+ HumidityMeasurementServer(humidityConfig5),
159559
+ PressureMeasurementServer2(pressureConfig4)
159560
+ );
159561
+ function WeatherDevice(homeAssistant) {
159562
+ return WeatherSensorType.set({ homeAssistantEntity: homeAssistant });
159563
+ }
159564
+
159507
159565
  // src/matter/endpoints/legacy/create-legacy-endpoint-type.ts
159508
159566
  var legacyLogger = Logger.get("LegacyEndpointType");
159509
159567
  function createLegacyEndpointType(entity, mapping, areaName, options) {
@@ -159589,7 +159647,8 @@ var deviceCtrs = {
159589
159647
  alarm_control_panel: AlarmControlPanelDevice,
159590
159648
  remote: RemoteDevice,
159591
159649
  water_heater: WaterHeaterDevice,
159592
- event: EventDevice
159650
+ event: EventDevice,
159651
+ weather: WeatherDevice
159593
159652
  };
159594
159653
  var matterDeviceTypeFactories = {
159595
159654
  on_off_light: (ha) => OnOffLightType.set({ homeAssistantEntity: ha }),