Current switch state after power on.

I need a TS0001 10A-type relay to control a well pump.
When the water in my tank reaches the high level, it cuts the power supply to the pump—an abrupt shutdown. Rewiring is difficult for me. When the well level is too low, a float switch sends an ON/OFF signal.
The problem arises upon restart: the well level is unknown and doesn’t match the three available options (ON, OFF, LAST_STATUS), as there is no way to simply indicate the float switch’s current state.
The same issue applies to a TS0001 connected to a standard wall switch: upon power-up, how do you indicate the switch’s state, given that it might have changed while the power was off?

Why? Switch is switch.
Can your relay handle your inductive pump load?

Agreed, a 10amp smart plug is not going to handle a well pump motor.
Need something that states it handles inductive loads of that motor or a regular resistive rated plug that is rated for minimum 3x the current listed on the motor rating plate.

OK for inductive problem, but my question is elsewhere. How the switch/relay can read the status at power on. The 3 possibilities of power_on_behavior (ON, OFF, LAST_STATUS) lacks the current status.

Shelly’s and most others have a switch input and the backend automatic input. rewire the float so it runs the manual switch input on the smart device and then you know the status if that. There is also a high current shelly that might handle the power, not sure.

Shelly’s on WIFI also have their additional interface that you can get to if HA is down, so backup for the control.

Maybe you may need to wire your float switch to be an input rather than it deciding the switching the power off and on, and send that to something running Tasmota that has startup scripts and HomeAssistant integration, and have that control your circuit with a suitably rated contactor switch for your pump motor.

Not sure what the issue is with your float switch. Is it opersting by triggering above or below a threshold? Why does it need to remember the last state? Can’t it check and report the current state continually during power up? Is it already smart? How is it currently wired? HomeAssistant can take care of remembering if it is suitably integrated.

Make and model and wiring of all the current devices, including the pump motor, may make it easier to suggest solutions. I note the TS0001 shows a rating of 16A on the label. This is not for motor startup inrush current, but for normal loads. Given the tiny size of the module, one must take ratings like this with a slight suspicion, especially if they are going to be used for mission critical things like water supply. You don’t want a powered charcoal mess near water when (not if) it fails. Suitably rated heavy duty contactors are common in the industrial control industry. You wire them in circuit to take the heavy load, and use your TS0001 to switch that instead.

Is the TS0001 a Tuya device? I see the Tuya integration is not so robust in HomeAssistant. Have you considered other devices, especially if the onboard relay only has to switch a contactor and not the entire pump load?

Appropriate waterproofing should be part of your consideration for reliability, safety, and longevity.

How far away is your pump from your HomeAssistant setup? How will you get commands and data to exchange, reliably? Do you have spare wires going to your pump that you could utilise with something like RS485 instead of using a radio connection like ZigBee?

A wiring diagram of how you currently have it connected would help.