I had a post up about this "problem" a month ago, and thought it was solved. It turns out that there is still problems.
I'm doing this in a Function Node:
var ha = global.get('homeassistant');
ha.homeAssistant.states['input_number.x'].state = 1;
global.set('homeassistant', ha);
Seen from the Context Tab in Home Assistant (under Global context) the variable changes as expected, but an Event-state node (Server-Change-State) monitoring input_number.x do not react to the change.
If input_number.x is altered using a Call-Service-Node (Api-Call-Service) everything works fine.
What I need, is to be able to alter input_number and input_boolean variables using a Function Node, instead of using a Call-Service-Node.
I'm running Node-Red on Home Assistant (Hassio) - all latest versions.
Any suggestions ?
Boja.