Read input_boolean status in python script

Hey all,
I am working on a python script tp set up my heating schedule. I have set a general schedule and everything is working fine.
In the next step I want to add an input_boolean thats state I want to use within the python script. This is the triggering of the script:

- alias: eg_bath_heating_scheduler
  initial_state: True
  trigger:
    - HERE IS MY TRIGGER
  action:
    service: python_script.heating_script
    target:
      entity_id: climate.bath
    data:

      IN_HEATING_SCHEDULE: input_boolean.in_heating_schedule

Now I want to read the state from IN_HEATING_SCHEDULE. I tried this with

...
in_heating_schedule = data.get("IN_HEATING_SCHEDULE")
hass.states.get(in_heating_schedule).state

But I can not get it up and running and I cant find informatio in the docs.

What I want to do later on is checking if

if in_heating_schedule ==  "On":
    do this
else
    do that

Best
Felix