mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
ptvo.switch - updated HA integration settings. (#3880)
* ptvo.switch - updated HA integration settings. * Update homeassistant.js Co-authored-by: ptvoinfo <xagga@ya.ru> Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
This commit is contained in:
parent
c72ccf1bd7
commit
4fbfec3fdb
@ -686,6 +686,16 @@ const lightEndpoint = (configType, endpointName) => {
|
||||
return config;
|
||||
};
|
||||
|
||||
const sensorEndpoint = (endpointName) => {
|
||||
return {
|
||||
type: 'sensor',
|
||||
object_id: `sensor_${endpointName}`,
|
||||
discovery_payload: {
|
||||
value_template: `{{ value_json.${endpointName} }}`,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
const thermostat = (minTemp=7, maxTemp=30, temperatureStateProperty='occupied_heating_setpoint', tempStep=1) => {
|
||||
return {
|
||||
type: 'climate',
|
||||
@ -1269,8 +1279,14 @@ const mapping = {
|
||||
'PM-B530-ZB': [cfg.sensor_power, cfg.switch],
|
||||
'PM-B430-ZB': [cfg.sensor_power, cfg.switch],
|
||||
'ptvo.switch': [
|
||||
switchEndpoint('bottom_left'), switchEndpoint('bottom_right'), switchEndpoint('top_left'),
|
||||
switchEndpoint('top_right'), switchEndpoint('center'), cfg.sensor_click,
|
||||
switchEndpoint('l1'), switchEndpoint('l2'), switchEndpoint('l3'),
|
||||
switchEndpoint('l4'), switchEndpoint('l5'), switchEndpoint('l6'),
|
||||
switchEndpoint('l7'), switchEndpoint('l8'),
|
||||
sensorEndpoint('l1'), sensorEndpoint('l2'), sensorEndpoint('l3'),
|
||||
sensorEndpoint('l4'), sensorEndpoint('l5'), sensorEndpoint('l6'),
|
||||
sensorEndpoint('l7'), sensorEndpoint('l8'),
|
||||
cfg.sensor_click, cfg.sensor_temperature, cfg.sensor_voltage,
|
||||
cfg.sensor_pressure, cfg.sensor_humidity,
|
||||
],
|
||||
'DIYRuZ_R4_5': [
|
||||
switchEndpoint('bottom_left'), switchEndpoint('bottom_right'), switchEndpoint('top_left'),
|
||||
|
Loading…
Reference in New Issue
Block a user