1 Commits

Author SHA1 Message Date
dependabot[bot]
fc5699f133 Bump actions/checkout from 5.0.0 to 6.0.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5.0.0...v6.0.2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-26 06:29:08 +00:00
4 changed files with 13 additions and 44 deletions

View File

@@ -21,7 +21,7 @@ jobs:
changed: ${{ steps.changed_addons.outputs.changed }}
steps:
- name: Check out the repository
uses: actions/checkout@v5.0.0
uses: actions/checkout@v6.0.2
- name: Get changed files
id: changed_files
@@ -71,7 +71,7 @@ jobs:
steps:
- name: Check out repository
uses: actions/checkout@v5.0.0
uses: actions/checkout@v6.0.2
- name: Get information
id: info

View File

@@ -18,7 +18,7 @@ jobs:
addons: ${{ steps.addons.outputs.addons_list }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v5.0.0
uses: actions/checkout@v6.0.2
- name: 🔍 Find add-on directories
id: addons
@@ -33,7 +33,7 @@ jobs:
path: ${{ fromJson(needs.find.outputs.addons) }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v5.0.0
uses: actions/checkout@v6.0.2
- name: 🚀 Run Home Assistant Add-on Lint
uses: frenck/action-addon-linter@v2.18

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 {