Skip to content

Commit

Permalink
Merge branch 'master' into feat-long-range
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Feb 6, 2024
2 parents 19bf575 + 16b8c1f commit ab86077
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
26 changes: 13 additions & 13 deletions api/hass/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ const THERMOSTAT_2GIG: HassDevice = {
type: 'climate',
object_id: 'thermostat',
values: [
'49-1-Air temperature',
'64-1-mode',
'66-1-state',
'67-1-setpoint-1',
'67-1-setpoint-2',
'68-1-mode',
'49-0-Air temperature',
'64-0-mode',
'66-0-state',
'67-0-setpoint-1',
'67-0-setpoint-2',
'68-0-mode',
],
action_map: {
0: 'idle',
Expand All @@ -73,21 +73,21 @@ const THERMOSTAT_2GIG: HassDevice = {
on: 1,
},
setpoint_topic: {
1: '67-1-setpoint-1',
2: '67-1-setpoint-2',
1: '67-0-setpoint-1',
2: '67-0-setpoint-2',
},
default_setpoint: '67-1-setpoint-1',
default_setpoint: '67-0-setpoint-1',
discovery_payload: {
min_temp: 50,
max_temp: 85,
modes: ['off', 'heat', 'cool'],
fan_modes: ['auto', 'on'],
action_topic: '66-1-state',
current_temperature_topic: '49-1-Air temperature',
action_topic: '66-0-state',
current_temperature_topic: '49-0-Air temperature',
current_temperature_template: '{{ value_json.value }}',
fan_mode_state_topic: '68-1-mode',
fan_mode_state_topic: '68-0-mode',
fan_mode_command_topic: true,
mode_state_topic: '64-1-mode',
mode_state_topic: '64-0-mode',
mode_command_topic: true,
temperature_state_template: '{{ value_json.value }}',
temperature_command_topic: true,
Expand Down
7 changes: 1 addition & 6 deletions api/lib/Gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1319,9 +1319,7 @@ export default class Gateway {
} else return
break
case CommandClasses['Central Scene']:
if (!valueId.readable || valueId.writeable) {
return
}
case CommandClasses['Scene Activation']:
cfg = utils.copy(hassCfg.central_scene)

// Combile unique Object id, by using all possible scenarios
Expand All @@ -1330,9 +1328,6 @@ export default class Gateway {
valueId.property,
valueId.propertyKey,
)
if (valueId.type === 'number') {
cfg.discovery_payload.state_class = 'measurement'
}
break
case CommandClasses['Binary Sensor']: {
// https://github.com/zwave-js/node-zwave-js/blob/master/packages/zwave-js/src/lib/commandclass/BinarySensorCC.ts#L41
Expand Down

0 comments on commit ab86077

Please sign in to comment.