What is the complete meaning of the mentioned command?

Referring manual installation guide of homeassistant.
I am new to Linux operating system.

Command:
sudo -u homeassistant -H -s

I think it canted my user account, if so how to get back tu my original user account ‘pi’?

Also what is srv directory?

The most useful command on linux is man, which gives you a manual page of just about every command.

man sudo

will explain the options, but basically you are switching to user homeassistant in a shell in that users home directory.

exit exits the current shell, and returns to the pi user.

Its just a directory common to all users. There is a convention for using it, but I’m not sure what it is.

Thanks for your answer!!