Run script in startup_action

trying to run a script on startup and I get Failed to call service error.

          startup_action:
            - service: floorplan.class_set
              service_data:
                elements:
                  - btn-forecast
                  - btn-active-mode
                  - btn-active-fan
                  - input_number.thermostat_ground
                class: button-off
            - service: floorplan.class_set
              service_data:
                elements:
                  - screen-forecast
                  - screen-mode
                  - screen-fan
                class: layer-hidden
            - service: floorplan.class_set
              service_data:
                elements:
                  - screen-home
                class: layer-visible
            - service: floorplan.class_set
              service_data:
                elements:
                  - btn-submit
                class: button-off

            - service: script.turn_on
              service_data:
                variables:
                  thermostat: input_number.thermostat_ground
                  sensor_value: sensor.thermostat_ground_tempsetting

Have you tried an automation with startup as the trigger?

i need it to run when the floorplan is loaded. I know it will work, I just don’t have the right syntax.

I haven’t done what you are trying to do. Have you tried running that script with that service data from the dev tools?