1 Commits

Author SHA1 Message Date
dependabot[bot]
7ef5db9715 Bump home-assistant/builder from 2025.09.0 to 2025.11.0
Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2025.09.0 to 2025.11.0.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2025.09.0...2025.11.0)

---
updated-dependencies:
- dependency-name: home-assistant/builder
  dependency-version: 2025.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 06:55:35 +00:00
5 changed files with 11 additions and 46 deletions

View File

@@ -106,7 +106,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/builder@2025.09.0
uses: home-assistant/builder@2025.11.0
with:
args: |
${{ env.BUILD_ARGS }} \

View File

@@ -1,9 +1,5 @@
<!-- https://developers.home-assistant.io/docs/add-ons/presentation#keeping-a-changelog -->
## 1.6.2 (16.05.2026)
- Fix invalid device_class + unit_of_measurement combinations for HA 2026.5 (#32).
## 1.6.1 (16.10.2025)
- Tweaked 'Ignore Availability Reports' setting.

View File

@@ -1,6 +1,6 @@
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
name: Futurehome
version: '1.6.2'
version: '1.6.1'
slug: futurehome
description: Local Futurehome Smarthub integration
url: 'https://github.com/adrianjagielak/home-assistant-futurehome'

View File

@@ -370,25 +370,16 @@ export function _meter__components(
break;
}
// Map FIMP unit names to HA-compatible unit_of_measurement values
const haUnit =
unit === 'power_factor' ? '' :
unit === 'VAr' ? 'var' :
unit === 'kVArh' ? 'kvarh' : unit;
const component: SensorComponent = {
unique_id: componentId,
platform: 'sensor',
entity_category: 'diagnostic',
name: friendlyName,
unit_of_measurement: unit,
state_class: stateClass,
value_template: `{{ value_json['${svc.addr}'].meter.${unit}.val | default(0) }}`,
};
if (haUnit) {
component.unit_of_measurement = haUnit;
}
if (deviceClass) {
component.device_class = deviceClass;
}
@@ -469,24 +460,16 @@ export function _meter__components(
break;
}
// Map FIMP unit names to HA-compatible unit_of_measurement values
const haUnit =
unit === 'VAr' ? 'var' :
unit === 'kVArh' ? 'kvarh' : unit;
const component: SensorComponent = {
unique_id: componentId,
platform: 'sensor',
entity_category: 'diagnostic',
name: friendlyName,
unit_of_measurement: unit,
state_class: stateClass,
value_template: `{{ value_json['${svc.addr}'].meter_export.${unit}.val | default(0) }}`,
};
if (haUnit) {
component.unit_of_measurement = haUnit;
}
if (deviceClass) {
component.device_class = deviceClass;
}
@@ -527,25 +510,14 @@ export function _meter__components(
// Determine unit based on value name
let unit = '';
const isPhasePower =
if (
valueName.startsWith('p_') ||
valueName.startsWith('p1') ||
valueName.startsWith('p2') ||
valueName.startsWith('p3');
if (isPhasePower && valueName.includes('_react')) {
unit = 'var';
} else if (isPhasePower && valueName.includes('_apparent')) {
unit = 'VA';
} else if (isPhasePower || valueName === 'dc_p') {
unit = 'W';
} else if (
(valueName.startsWith('e_') ||
valueName.startsWith('e1') ||
valueName.startsWith('e2') ||
valueName.startsWith('e3')) &&
valueName.includes('_react')
valueName.startsWith('p3') ||
valueName === 'dc_p'
) {
unit = 'kvarh';
unit = 'W';
} else if (
valueName.startsWith('e_') ||
valueName.startsWith('e1') ||
@@ -593,9 +565,9 @@ export function _meter__components(
}
// Set suggested display precision
if (unit === 'kWh' || unit === 'kvarh') {
if (unit === 'kWh') {
component.suggested_display_precision = 3;
} else if (unit === 'W' || unit === 'V' || unit === 'A' || unit === 'var' || unit === 'VA') {
} else if (unit === 'W' || unit === 'V' || unit === 'A') {
component.suggested_display_precision = 1;
} else if (unit === 'Hz') {
component.suggested_display_precision = 2;

View File

@@ -72,15 +72,12 @@ export function _sensor_numeric__components(
if (!data) return undefined;
let device_class = data[0];
const device_class = data[0];
const name = data[1];
let unit = svc.props?.sup_units?.[0] ?? data[2];
if (unit === 'C') unit = '°C';
if (unit === 'F') unit = '°F';
if (unit === 'kph') unit = 'km/h';
if (unit === 'Lux') unit = 'lx';
// HA rejects illuminance + %; drop device_class for percentage-reporting sensors
if (device_class === 'illuminance' && unit === '%') device_class = undefined;
const state_class = data[3];
return {