mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 15:47:08 +00:00
Add extracting device manufacturer name
This commit is contained in:
parent
58e22e941f
commit
0f103dcb8e
@ -10,6 +10,7 @@
|
||||
- Added support for 'barrier_ctrl' service (devices like garage doors, barriers, and window shades).
|
||||
- Added support for 'water_heater' service (devices such as water boiler or a water tank).
|
||||
- Updated demo mode data.
|
||||
- Added extracting device manufacturer name.
|
||||
|
||||
# 0.1.0 (24.07.2025)
|
||||
|
||||
|
@ -4,9 +4,10 @@ export type VinculumPd7Device = {
|
||||
name?: string | null;
|
||||
} | null;
|
||||
id: number;
|
||||
// "Model", e.g. "zb - _TZ3040_bb6xaihh - TS0202"
|
||||
// "Model" string, e.g. "zb - _TZ3040_bb6xaihh - TS0202"
|
||||
// The first one is the adapter, the second one is the manufacturer, the third one is the device model.
|
||||
model?: string | null;
|
||||
// "Model alias", e.g. "TS0202"
|
||||
// Device model, e.g. "TS0202"
|
||||
modelAlias?: string | null;
|
||||
functionality?:
|
||||
| 'appliance'
|
||||
|
@ -259,10 +259,14 @@ export function haPublishDevice(parameters: {
|
||||
if (parameters.demoMode) {
|
||||
// Apply optimistic override
|
||||
for (const component of Object.values(components)) {
|
||||
if ((component as any).optimistic === false) {
|
||||
(component as any).optimistic = true;
|
||||
}
|
||||
}
|
||||
|
||||
let vinculumManufacturer: string | undefined;
|
||||
const parts = (parameters.vinculumDeviceData?.model ?? '').split(' - ');
|
||||
if (parts.length === 3) {
|
||||
vinculumManufacturer = parts[1];
|
||||
}
|
||||
|
||||
const configTopic = `${topicPrefix}/config`;
|
||||
@ -277,7 +281,9 @@ export function haPublishDevice(parameters: {
|
||||
parameters.deviceInclusionReport?.product_name ??
|
||||
undefined,
|
||||
manufacturer:
|
||||
parameters.deviceInclusionReport?.manufacturer_id ?? undefined,
|
||||
vinculumManufacturer ??
|
||||
parameters.deviceInclusionReport?.manufacturer_id ??
|
||||
undefined,
|
||||
model:
|
||||
parameters.vinculumDeviceData?.modelAlias ??
|
||||
parameters.deviceInclusionReport?.product_id ??
|
||||
|
Loading…
x
Reference in New Issue
Block a user