Old style floorplan question

Due to issues with the installation of HA-Floorplan throwing up errors for me (raised in HA Floorplan initial failure), I ploughed on with the old school method using a Picture entitity card and overlays of png files.

Generally, it is going ok. However, I am at a bit of an impasse where I have created overlays that allow for the interaction of light rays between rooms, such as where doors have glass panels. Whereas many overlays are simply a boolean on/off for a single light button and simple single room overlay, there are circumstance where I need to check if an adjoining room has a light on and, if so, use a specialised overlay that combines the light of both rooms. Similarly, if the room adjoining is dark, it affects light and shadow in the current “toggled” room. So to put it simply, I need the equivalent of nested else/if conditional statements in the entity to define which image file is used in the state-image, based on other entity states. I am not sure how the picture entity card code can support this…

Anybody dealt with this before and, if so, do they have examples?

Worked it out. Created a bitwise based template sensor in my config yaml that took the state of each light entity and added together binary values for each status eg kitchen light on = 1 pantry light on = 2 conservatory light on = 4, add values together and get distinct values between 0 and 7 that tell me precisely which lights are on. Then I could access this sensor and use the values to define which png file to use as the state-image.