Koenkk / zigbee-herdsman-converters

Collection of device converters to be used with zigbee-herdsman
MIT License
939 stars 3.09k forks source link

Support for Nous E6 - different fingerprint #8023

Closed pmarki closed 1 month ago

pmarki commented 2 months ago

Hi, Great work guys!

I bought Nous e6 temp and humidity LCD sensor, I checked before if it's supported and ... device not recognized, so I copied pieces from https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/devices/nous.ts following the guide about adding new device and what is missing to support it is: fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE284_wtikaxzs'}],

The full file in case someone else will be in trouble:

const {} = require('zigbee-herdsman-converters/lib/modernExtend');
// Add the lines below
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const legacy = require('zigbee-herdsman-converters/lib/legacy')
const tuya = require('zigbee-herdsman-converters/lib/tuya')
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const ota = require('zigbee-herdsman-converters/lib/ota');
const utils = require('zigbee-herdsman-converters/lib/utils');
const globalStore = require('zigbee-herdsman-converters/lib/store');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE284_wtikaxzs'}],
        model: 'E6',
        vendor: 'Nous',
        description: 'Nous Temperature & humidity LCD sensor',
        fromZigbee: [legacy.fz.nous_lcd_temperature_humidity_sensor, fz.ignore_tuya_set_time],
        toZigbee: [legacy.tz.nous_lcd_temperature_humidity_sensor],
        onEvent: tuya.onEventSetLocalTime,
        configure: async (device, coordinatorEndpoint) => {
            const endpoint = device.getEndpoint(1);
            await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic']);
        },
        exposes: [
            e.temperature(),
            e.humidity(),
            e.battery(),
            e.enum('temperature_unit_convert', ea.STATE_SET, ['celsius', 'fahrenheit']).withDescription('Current display unit'),
            e.enum('temperature_alarm', ea.STATE, ['canceled', 'lower_alarm', 'upper_alarm']).withDescription('Temperature alarm status'),
            e.numeric('max_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60).withDescription('Alarm temperature max'),
            e.numeric('min_temperature', ea.STATE_SET).withUnit('°C').withValueMin(-20).withValueMax(60).withDescription('Alarm temperature min'),
            e
                .numeric('temperature_sensitivity', ea.STATE_SET)
                .withUnit('°C')
                .withValueMin(0.1)
                .withValueMax(50)
                .withValueStep(0.1)
                .withDescription('Temperature sensitivity'),
        ],
};

module.exports = definition;

Probably can be added to original nous.ts?

Koenkk commented 2 months ago

Could you make a PR by clicking here?

steve41200 commented 1 month ago

Where do you have type your code ? I have the same device, no recognize Thank you

Koenkk commented 1 month ago

_TZE284_wtikaxzs will be supported in tomorrows release.

steve41200 commented 1 month ago

Thank you, i have try the Edge version and it works.Hope to install the new version Le 31 oct. 2024 à 21:12, Koen Kanters @.***> a écrit : _TZE284_wtikaxzs will be supported in tomorrows release.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>