In Node Red, sometimes, when I need to check the state of an entity, it is easier to check it inside a function node instead of in a “get entities” or “current state” node.
This code:
var states = global.get('homeassistant.homeAssistant.states');
var timerstate = states["timer.timer1"].state;
seems to do the job. Is this a reliable way to do it?