diff --git a/src/devices/index.ts b/src/devices/index.ts index ce31ceca2ce65..5f685ff25d7e4 100644 --- a/src/devices/index.ts +++ b/src/devices/index.ts @@ -222,6 +222,7 @@ import plaid from './plaid'; import plugwise from './plugwise'; import profalux from './profalux'; import prolight from './prolight'; +import purmo from './purmo'; import pushok from './pushok'; import qa from './qa'; import qmotion from './qmotion'; @@ -544,6 +545,7 @@ export default [ ...plugwise, ...profalux, ...prolight, + ...purmo, ...pushok, ...qmotion, ...qoto, diff --git a/src/devices/purmo.ts b/src/devices/purmo.ts new file mode 100644 index 0000000000000..fee32b7018ac0 --- /dev/null +++ b/src/devices/purmo.ts @@ -0,0 +1,62 @@ +import fz from '../converters/fromZigbee'; +import tz from '../converters/toZigbee'; +import * as exposes from '../lib/exposes'; +import * as reporting from '../lib/reporting'; +import {DefinitionWithExtend} from '../lib/types'; + +const e = exposes.presets; + +const definitions: DefinitionWithExtend[] = [ + { + fingerprint: [{modelID: 'PUMM01102', manufacturerName: 'computime'}], + model: 'Yali Parada Plus', + vendor: 'Purmo/Radson', + description: 'Electric oil-filled radiator', + extend: [], + fromZigbee: [fz.thermostat], + toZigbee: [ + tz.thermostat_occupancy, + tz.thermostat_local_temperature, + tz.thermostat_occupied_heating_setpoint, + tz.thermostat_unoccupied_heating_setpoint, + tz.thermostat_system_mode, + tz.thermostat_running_mode, + tz.thermostat_running_state, + tz.thermostat_max_heat_setpoint_limit, + tz.thermostat_local_temperature_calibration, + ], + meta: {}, + exposes: [ + e + .climate() + .withSetpoint('occupied_heating_setpoint', 5, 30, 0.5) + .withSetpoint('unoccupied_heating_setpoint', 5, 30, 0.5) + .withSystemMode(['heat', 'off']) + .withLocalTemperature() + .withLocalTemperatureCalibration() + .withRunningState(['idle', 'heat']) + .withRunningMode(['off', 'heat']), + e.max_heat_setpoint_limit(5, 30, 0.5), + ], + configure: async (device, coordinatorEndpoint) => { + const endpoint = device.getEndpoint(1); + const binds = ['genBasic', 'genIdentify', 'genTime', 'hvacThermostat', 'hvacUserInterfaceCfg']; + await reporting.bind(endpoint, coordinatorEndpoint, binds); + + await reporting.thermostatSystemMode(endpoint); + await reporting.thermostatTemperature(endpoint); + await reporting.thermostatRunningState(endpoint); + await reporting.thermostatRunningMode(endpoint); + await reporting.thermostatOccupiedHeatingSetpoint(endpoint); + await reporting.thermostatUnoccupiedHeatingSetpoint(endpoint); + await reporting.thermostatOccupancy(endpoint); + await reporting.thermostatTemperatureCalibration(endpoint); + + device.powerSource = 'Mains (single phase)'; + device.save(); + }, + }, +]; + +export default definitions; +module.exports = definitions;