Custom entity more than 2 states?

How can I create my own entity that has more than an on and off state. I’m trying to create a “room” entity that has states of occupied, engaged and vacant. I’m still new to Home Assistant, but I see there’s a way to create an entity as binary, but what if it has more than two possible states?

Maybe I’m using the wrong terminology but that’s the idea.

That can be done with a template, like for instance here:

template:
  - sensor: 
      - name: Power rating
        state: >
          {% if states('sensor.power')|float(0) < 100 %}
            low
          {% elif states('sensor.power')|float(0) < 1000 %}
            medium
          {% else %}
            high
          {% endif %}

Got it but had to jump thru some hoops and get python to set the state. Found a thread that was years old—I’m assuming python is still needed for such useful function as setting the state. Coming from hubitat, I really miss how they got it simplified compared to HA.

You could post some code so others could possibly help you see if there is something simpler.

But, what is here so far gives no one any way to help you.