@bertreb said in Customize - ioBroker.pimatic:
// convert values
if (objects[id].common.type === ‘boolean’) {
state.val = (state.val === true || state.val === ‘true’ || state.val === ‘1’ || state.val === 1 || state.val === ‘on’ || state.val === ‘ON’);
} else if (objects[id].common.type === ‘number’) {
if (typeof state.val !== ‘number’) {
if (state.val === true || state.val === ‘true’ || state.val === ‘on’ || state.val === ‘ON’) {
state.val = 1;
} else if (state.val === false || state.val === ‘false’ || state.val === ‘off’ || state.val === ‘OFF’) {
state.val = 0;
}
} else {
state.val = parseFloat((state.val || ‘0’).toString().replace(’,’, ‘.’));
}
}
frist BIG THANKS … but i think it changes nothing … no new devices and the when i try to change a Value of a VariablesDevice it will just say in the Log “its Readonly” … i think its because a varaibles devices will create other variable that is readonly
My Custom Variables:
And the new ones that will be created by Pimatic after you set them to a Variables Devices:
And in Iobroker it will also say its the “state” of this Devices:
But i think i must be the right way because with the old and new Main.js you will find this in the Iobroker Log:
pimatic.0 2020-03-02 20:07:16.969 warn (28559) Unknown state: pimatic.0.devices.zwave-wohnzimmerpir-luminance
pimatic.0 2020-03-02 20:07:16.969 warn (28559) Unknown state: pimatic.0.devices.zwave-wohnzimmerpir-battery
pimatic.0 2020-03-02 20:07:16.968 warn (28559) Unknown state: pimatic.0.devices.zwave-badpir-battery
pimatic.0 2020-03-02 20:07:16.968 warn (28559) Unknown state: pimatic.0.devices.zwave-badpir-temperatur
pimatic.0 2020-03-02 20:07:16.968 warn (28559) Unknown state: pimatic.0.devices.zwave-badpir-luminance
pimatic.0 2020-03-02 20:07:16.968 warn (28559) Unknown state: pimatic.0.devices.zwave-flurpir-battery
pimatic.0 2020-03-02 20:07:16.968 warn (28559) Unknown state: pimatic.0.devices.zwave-flurpir-temperatur
pimatic.0 2020-03-02 20:07:16.968 warn (28559) Unknown state: pimatic.0.devices.zwave-flurpir-luminance
pimatic.0 2020-03-02 20:07:16.967 warn (28559) Unknown state: pimatic.0.devices.zwave-flurpir2-battery
pimatic.0 2020-03-02 20:07:16.967 warn (28559) Unknown state: pimatic.0.devices.zwave-flurpir2-temperatur
pimatic.0 2020-03-02 20:07:16.967 warn (28559) Unknown state: pimatic.0.devices.zwave-flurpir2-luminance
pimatic.0 2020-03-02 20:07:16.967 warn (28559) Unknown state: pimatic.0.devices.zwave-kuchepir2-luminance