Error connecting mysenssor serialGateway to Bed Occupancy with homeassistant

Please read the sticky post which covers a number of things, including how to format code in your post. If you don’t format the code correctly it’s really hard for people to help you.