Device is likely the wrong node to start with. Event state and trigger node are the two primary starts to a flow. Use a trigger node and put the power entity where shown. Set the state to > 2000. Take note of the drop downs set to number
From there a current state can check the battery level > 50 and the node will fire from the top. All nodes that evaluate to true fire from the top.
![image](https://community-assets.home-assistant.io/original/4X/f/6/b/f6b5cb8c7598ef7e84a0e8ed1abe0c24f017fdc0.png)
There is also a turn off sequence in the below
[{"id":"b6189fe1e5e7132d","type":"trigger-state","z":"0a325c35fc29f44e","name":"","server":"","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"power","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","propertyValue":"new_state.state","comparatorType":">","comparatorValueDatatype":"num","comparatorValue":"2000"}],"customOutputs":[],"outputInitially":false,"stateType":"num","enableInput":false,"x":190,"y":1460,"wires":[["0ed55bdec75e3b4d"],[]]},{"id":"0ed55bdec75e3b4d","type":"api-current-state","z":"0a325c35fc29f44e","name":"","server":"","version":3,"outputs":2,"halt_if":"50","halt_if_type":"num","halt_if_compare":"gt","entity_id":"battery","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":1460,"wires":[["2b6b7d318692ddbe"],[]]},{"id":"2b6b7d318692ddbe","type":"time-range-switch","z":"0a325c35fc29f44e","name":"time range","lat":"","lon":"","startTime":"07:28","endTime":"goldenHour","startOffset":0,"endOffset":0,"x":710,"y":1460,"wires":[["26f5588994bb66f4"],[]]},{"id":"26f5588994bb66f4","type":"api-call-service","z":"0a325c35fc29f44e","name":"heater on","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":920,"y":1460,"wires":[[]]},{"id":"a3a908d118138e86","type":"server-state-changed","z":"0a325c35fc29f44e","name":"","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"Battery","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"50","ifStateType":"num","ifStateOperator":"lte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":1520,"wires":[["048c35594de6f669"],[]]},{"id":"e61a8257dbde751e","type":"server-state-changed","z":"0a325c35fc29f44e","name":"","server":"","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"power","entityIdType":"exact","outputInitially":false,"stateType":"num","ifState":"2000","ifStateType":"num","ifStateOperator":"lte","outputOnlyOnStateChange":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":180,"y":1580,"wires":[["048c35594de6f669"],[]]},{"id":"048c35594de6f669","type":"api-call-service","z":"0a325c35fc29f44e","name":"heater off","server":"","version":5,"debugenabled":false,"domain":"","service":"","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":460,"y":1540,"wires":[[]]}]