I'm a noob to Node Red with Home Assistant and have created an API flow that retrieves aviation weather. I parse it with the json node and am able to see all of the needed elements of the API call. What I'm struggling with is that HA retains entity values until it's either restarted or the entity updates. I'm trying to create a logic flow that will only display (visibility on the HA Dashboard) the cloud levels if there is valid data. The API that I use will provide me with up to three cloud layers (cloud type and altitude). There are not always three cloud layers when the API fires, so if those layers are not present, it generates an error (TypeError). I want to create a binary sensor that will show True when there is a valid numeric value and False when it's TypeError.
Any takers? If so, please be specific on the Node Red instructions. Thanks in advance!