Hi guys,
Recently I’ve updated all my Docker containers (HA v0.112.3, Node-RED v1.1.0, Z2M, Mosquitto etc.). After the updates all kind of wierd behaviour started. Xiaumo switches not starting automations, half of all lights turn on. I can only do one thing at the time so it’s diving into;
Why does HA seem to set brightness to 0? At a certain point lights will not switch on when I trigger an automation flow in Node-RED. Actually they turn_on but with brightness: 0. It seems to be a time related issue. When I manually set brightness in HA, triggering NR flows works and after some random timespan lights in that flow just stop turning on. Brightness I just 0. Adjust the brightness in HA fix issue for 5,10, 60mins… It happens with Tradfri lights and Hue Lights. I don’t have a clue if it’s Home Assistant or Node-RED. I don’t think it will be Zigbee2MQTT or even Mosquitto.
Example of piece of a flow in NR. I dynamically call light service from function Nodes
Function node - Joined Array of states
const newMsg = {
"topic": "joined_sensors",
"payload": undefined
};
const someOn = msg.payload.some( state => state === "on");
const everyOff = msg.payload.every( state => state === "off");
if(!someOn && !everyOff) {
return null;
}
newMsg.payload = (someOn) ? "on" : "off";
return newMsg;
Function node - Dynamic Call Light Services
const newMsg = {
"topic": msg.topic,
"payload": {
"domain": "light",
"service": undefined
}
};
const service = {
"on": "turn_on",
"off": "turn_off"
};
newMsg.payload.service = service[msg.payload] || "toggle";
return newMsg
Does anyone has the slightest clue what causes this amnesia?