first of all. I am very new in home assistant and try to enlarge m knowlegde.
I have a problem with the state. I have a socket at my washing-machine. This socket is meter the flow. In the YAML of the card, I will get a condition, that if the flow is “0”, than don’t show the card. If it is >0, than show the card.
Background is, that I will show a green icon, if the washing-machine is free “flow = 0 W” and if the washing-machine is in operation “flow > 0 W”, that the icon is red.
I would probably use template to create binary sensor. Developer → Template you can write and test jinja statement. Jinja I think is quite good at allowing states to be tested and caught first.