mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 07:37:09 +00:00
Hide the fallback 'basic' Z-Wave service unless it’s the only one
This commit is contained in:
parent
b882cbab91
commit
ef4bd2b342
11
README.md
11
README.md
@ -41,7 +41,6 @@ todo add info about factory reset hub to restore 30 day trial
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Alarm | [alarm_appliance](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_burglar](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_emergency](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_fire](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_gas](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_health](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_heat](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_lock](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_power](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_siren](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_system](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_time](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_water](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_water_valve](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_weather](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts) | [Brannvarsler](https://www.futurehome.io/en_no/shop/brannvarsler-230v) | ✅ | [Binary sensor](https://www.home-assistant.io/integrations/binary_sensor/), [Button](https://www.home-assistant.io/integrations/button/) |
|
||||
| Blinds/door | [barrier_ctrl](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/barrier_ctrl.ts) | | ✅ | [Cover](https://www.home-assistant.io/integrations/cover/) |
|
||||
| Basic | [basic](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/basic.ts) | | ✅ | [Number](https://www.home-assistant.io/integrations/number/) |
|
||||
| Battery | [battery](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/battery.ts)| | ✅ | [Sensor](https://www.home-assistant.io/integrations/sensor/), [Binary sensor](https://www.home-assistant.io/integrations/binary_sensor/) |
|
||||
| Chargepoint | [chargepoint](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/chargepoint.ts) | [Futurehome Charge](https://www.futurehome.io/en_no/shop/charge) | ✅ | [Sensor](https://www.home-assistant.io/integrations/sensor/), [Switch](https://www.home-assistant.io/integrations/switch/), [Number](https://www.home-assistant.io/integrations/number/), [Select](https://www.home-assistant.io/integrations/select/) |
|
||||
| Color control | [color_ctrl](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/color_ctrl.ts) | | ✅ | [Light](https://www.home-assistant.io/integrations/light/) |
|
||||
@ -65,18 +64,24 @@ todo add info about factory reset hub to restore 30 day trial
|
||||
|
||||
| Name | Service | Implementation status | Home Assistant entity |
|
||||
| --- | --- | --- | --- |
|
||||
| Fall-back Z-wave 'basic' service | [basic](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/basic.ts) | | ✅ | [Number](https://www.home-assistant.io/integrations/number/) |
|
||||
| Reboot device | [dev_sys](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/dev_sys.ts) | | ✅ | [Button](https://www.home-assistant.io/integrations/button/) |
|
||||
| Identify device | [indicator_ctrl](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/indicator_ctrl.ts) | | ✅ | [Button](https://www.home-assistant.io/integrations/button/) |
|
||||
| Advanced configuration of a device | [parameters](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/parameters.ts) | | ✅ | [Button](https://www.home-assistant.io/integrations/button/), [Sensor](https://www.home-assistant.io/integrations/sensor/), [Number](https://www.home-assistant.io/integrations/number/), [Select](https://www.home-assistant.io/integrations/select/), [Text](https://www.home-assistant.io/integrations/text/) |
|
||||
|
||||
## Hub
|
||||
|
||||
| Name | Service | Implementation status | Home Assistant entity |
|
||||
| --- | --- | --- | --- |
|
||||
| Futurehome Smarthub | gateway | | |
|
||||
|
||||
## Other system, meta, unused, or not essential services
|
||||
|
||||
| Service | Description |
|
||||
| --- | --- |
|
||||
| association | |
|
||||
| association | Virtual association between devices. Easily reproducible using Home Assistant's built-in configuration. |
|
||||
| battery_charge_ctrl | No devices or hub support this stub service. |
|
||||
| diagnostic | Diagnostic (logging, etc) |
|
||||
| gateway | |
|
||||
| inverter_consumer_conn | No devices or hub support this stub service. |
|
||||
| inverter_grid_conn | No devices or hub support this stub service. |
|
||||
| inverter_solar_conn | No devices or hub support this stub service. |
|
||||
|
@ -13,6 +13,7 @@
|
||||
- Added support for 'complex_alarm_system' service (part of alarm sirens control).
|
||||
- Added support for 'dev_sys' service (reboot device).
|
||||
- Added support for 'parameters' service (advanced configuration of a device).
|
||||
- Hide the fallback 'basic' Z-Wave service unless it is the only service present.
|
||||
|
||||
## 0.1.5 (25.07.2025)
|
||||
|
||||
|
@ -40,7 +40,6 @@ todo add info about factory reset hub to restore 30 day trial
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Alarm | [alarm_appliance](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_burglar](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_emergency](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_fire](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_gas](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_health](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_heat](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_lock](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_power](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_siren](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_system](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_time](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_water](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_water_valve](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts), [alarm_weather](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/_alarm.ts) | [Brannvarsler](https://www.futurehome.io/en_no/shop/brannvarsler-230v) | ✅ | [Binary sensor](https://www.home-assistant.io/integrations/binary_sensor/), [Button](https://www.home-assistant.io/integrations/button/) |
|
||||
| Blinds/door | [barrier_ctrl](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/barrier_ctrl.ts) | | ✅ | [Cover](https://www.home-assistant.io/integrations/cover/) |
|
||||
| Basic | [basic](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/basic.ts) | | ✅ | [Number](https://www.home-assistant.io/integrations/number/) |
|
||||
| Battery | [battery](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/battery.ts)| | ✅ | [Sensor](https://www.home-assistant.io/integrations/sensor/), [Binary sensor](https://www.home-assistant.io/integrations/binary_sensor/) |
|
||||
| Chargepoint | [chargepoint](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/chargepoint.ts) | [Futurehome Charge](https://www.futurehome.io/en_no/shop/charge) | ✅ | [Sensor](https://www.home-assistant.io/integrations/sensor/), [Switch](https://www.home-assistant.io/integrations/switch/), [Number](https://www.home-assistant.io/integrations/number/), [Select](https://www.home-assistant.io/integrations/select/) |
|
||||
| Color control | [color_ctrl](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/color_ctrl.ts) | | ✅ | [Light](https://www.home-assistant.io/integrations/light/) |
|
||||
@ -64,18 +63,24 @@ todo add info about factory reset hub to restore 30 day trial
|
||||
|
||||
| Name | Service | Implementation status | Home Assistant entity |
|
||||
| --- | --- | --- | --- |
|
||||
| Fall-back Z-wave 'basic' service | [basic](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/basic.ts) | | ✅ | [Number](https://www.home-assistant.io/integrations/number/) |
|
||||
| Reboot device | [dev_sys](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/dev_sys.ts) | | ✅ | [Button](https://www.home-assistant.io/integrations/button/) |
|
||||
| Identify device | [indicator_ctrl](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/indicator_ctrl.ts) | | ✅ | [Button](https://www.home-assistant.io/integrations/button/) |
|
||||
| Advanced configuration of a device | [parameters](https://github.com/adrianjagielak/home-assistant-futurehome/blob/master/futurehome/src/services/parameters.ts) | | ✅ | [Button](https://www.home-assistant.io/integrations/button/), [Sensor](https://www.home-assistant.io/integrations/sensor/), [Number](https://www.home-assistant.io/integrations/number/), [Select](https://www.home-assistant.io/integrations/select/), [Text](https://www.home-assistant.io/integrations/text/) |
|
||||
|
||||
## Hub
|
||||
|
||||
| Name | Service | Implementation status | Home Assistant entity |
|
||||
| --- | --- | --- | --- |
|
||||
| Futurehome Smarthub | gateway | | |
|
||||
|
||||
## Other system, meta, unused, or not essential services
|
||||
|
||||
| Service | Description |
|
||||
| --- | --- |
|
||||
| association | |
|
||||
| association | Virtual association between devices. Easily reproducible using Home Assistant's built-in configuration. |
|
||||
| battery_charge_ctrl | No devices or hub support this stub service. |
|
||||
| diagnostic | Diagnostic (logging, etc) |
|
||||
| gateway | |
|
||||
| inverter_consumer_conn | No devices or hub support this stub service. |
|
||||
| inverter_grid_conn | No devices or hub support this stub service. |
|
||||
| inverter_solar_conn | No devices or hub support this stub service. |
|
||||
|
@ -128,6 +128,15 @@ export type CommandHandlers = {
|
||||
[topic: string]: (payload: string) => Promise<void>;
|
||||
};
|
||||
|
||||
function ignoreService(
|
||||
topicPrefix: string,
|
||||
device: VinculumPd7Device,
|
||||
svc: VinculumPd7Service,
|
||||
svcName: string,
|
||||
): ServiceComponentsCreationResult | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const serviceHandlers: {
|
||||
[name: string]: (
|
||||
topicPrefix: string,
|
||||
@ -148,30 +157,39 @@ const serviceHandlers: {
|
||||
alarm_siren: _alarm__components,
|
||||
alarm_system: _alarm__components,
|
||||
alarm_time: _alarm__components,
|
||||
alarm_water_valve: _alarm__components,
|
||||
alarm_water: _alarm__components,
|
||||
alarm_water_valve: _alarm__components,
|
||||
alarm_weather: _alarm__components,
|
||||
association: ignoreService,
|
||||
barrier_ctrl: barrier_ctrl__components,
|
||||
basic: basic__components,
|
||||
battery: battery__components,
|
||||
battery_charge_ctrl: ignoreService,
|
||||
chargepoint: chargepoint__components,
|
||||
color_ctrl: color_ctrl__components,
|
||||
complex_alarm_system: complex_alarm_system__components,
|
||||
dev_sys: dev_sys__components,
|
||||
diagnostic: ignoreService,
|
||||
door_lock: door_lock__components,
|
||||
doorman: doorman__components,
|
||||
fan_ctrl: fan_ctrl__components,
|
||||
indicator_ctrl: indicator_ctrl__components,
|
||||
inverter_consumer_conn: ignoreService,
|
||||
inverter_grid_conn: ignoreService,
|
||||
inverter_solar_conn: ignoreService,
|
||||
media_player: media_player__components,
|
||||
meter_cooling: _meter__components,
|
||||
meter_elec: _meter__components,
|
||||
meter_gas: _meter__components,
|
||||
meter_water: _meter__components,
|
||||
meter_heating: _meter__components,
|
||||
meter_cooling: _meter__components,
|
||||
meter_water: _meter__components,
|
||||
ota: ignoreService,
|
||||
out_bin_switch: out_bin_switch__components,
|
||||
out_lvl_switch: out_lvl_switch__components,
|
||||
parameters: parameters__components,
|
||||
power_regulator: ignoreService,
|
||||
scene_ctrl: scene_ctrl__components,
|
||||
schedule: ignoreService,
|
||||
schedule_entry: schedule_entry__components,
|
||||
sensor_accelx: _sensor_numeric__components,
|
||||
sensor_accely: _sensor_numeric__components,
|
||||
@ -181,8 +199,8 @@ const serviceHandlers: {
|
||||
sensor_anglepos: _sensor_numeric__components,
|
||||
sensor_atmo: _sensor_numeric__components,
|
||||
sensor_baro: _sensor_numeric__components,
|
||||
sensor_co: _sensor_numeric__components,
|
||||
sensor_co2: _sensor_numeric__components,
|
||||
sensor_co: _sensor_numeric__components,
|
||||
sensor_contact: _sensor_binary__components,
|
||||
sensor_current: _sensor_numeric__components,
|
||||
sensor_dew: _sensor_numeric__components,
|
||||
@ -216,8 +234,13 @@ const serviceHandlers: {
|
||||
sensor_wind: _sensor_numeric__components,
|
||||
siren_ctrl: siren_ctrl__components,
|
||||
sound_switch: sound_switch__components,
|
||||
technology_specific: ignoreService,
|
||||
thermostat: thermostat__components,
|
||||
time: ignoreService,
|
||||
time_parameters: ignoreService,
|
||||
user_code: user_code__components,
|
||||
version: ignoreService,
|
||||
virtual_meter_elec: ignoreService,
|
||||
water_heater: water_heater__components,
|
||||
};
|
||||
|
||||
@ -247,6 +270,10 @@ function shouldPublishService(
|
||||
svcName: string,
|
||||
services: { [name: string]: VinculumPd7Service },
|
||||
): boolean {
|
||||
if (svcName === 'basic' && Object.entries(services).length > 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const exclusions = serviceExclusionMap[svcName];
|
||||
if (!exclusions) return true;
|
||||
|
||||
|
@ -32,6 +32,7 @@ export function basic__components(
|
||||
[svc.addr]: {
|
||||
unique_id: svc.addr,
|
||||
platform: 'number',
|
||||
entity_category: 'config',
|
||||
name: device.client?.name ?? device?.modelAlias,
|
||||
min: MIN_LVL,
|
||||
max: MAX_LVL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user