Good morning,
As I understand it, the ready() method is a hook that is called when the onInit() method has been executed. And that’s how it’s implemented, ready() is not overridden, it’s just defined in the base class.
Baseclass:
ready() {
return Promise.resolve(this.deviceReady());
}
async deviceReady() {
try {
await this.setAvailable();
await this.getDeviceValues();
this.log('Device ready');
} catch {}
}
Subclass
async deviceReady() {
try {
super.deviceReady();
const dingzDevice = await this.getDingzDevice();
await this.initMotionDetector(dingzDevice);
await this.initDingzSensors();
this.updateSettingLabels();
} catch {}
}