OK, so I managed to sort out the error. I had copied a configuration from an example and it had entity: under the state_image. So the error reported did not relate to lines 549 and 554. The error was on lines 550 and 555. I was looking at the line numbers reported which was wrong.
I simply removed the second instance of entity: group.critical.devices on line 555 and no more errors being reported.
You may also run into issueswith state_image and image. Pick one or the other, don’t combine the two if you can. If the image doesn’t change based on the state, remove the whole state_image section. Or if you want to make it work based on the state, remove the image line.
Thank you Petro, great suggestion. I have commented out the image and have added the alternate image states to the state_image. It was working as I had it but I prefer your suggestion.