This commit is contained in:
sebseb7
2025-12-25 05:43:36 +01:00
parent ab89cbc97f
commit c794dbaab8
4 changed files with 56 additions and 8 deletions

View File

@@ -297,10 +297,15 @@ function syncOutputStates() {
if (row.value > 0) {
const binding = OUTPUT_BINDINGS[row.channel];
if (binding) {
let commandValue = row.value;
if (binding.type === 'switch') {
commandValue = row.value > 0 ? 1 : 0;
}
const success = sendCommandToDevicePrefix(`${binding.device}:`, {
device: binding.channel,
action: 'set_state',
value: 1
value: commandValue
});
if (!success) {
@@ -747,9 +752,7 @@ module.exports = {
`);
const last = lastStmt.get(channel);
if (channel === 'CircFanLevel') {
console.log('[RuleRunner] Debug Bindings:', JSON.stringify(OUTPUT_BINDINGS['CircFanLevel']));
}
// Debug log removed
const valueChanged = !last || Math.abs(last.value - value) >= Number.EPSILON;