hey i wrote a code that connects my computer and raspberry home assistant and sends my display status to home assistant and i want my lights to go on when i switch to display 1 and off when i switch display 2
now i get the status in the home assistant visual studio code add in the terminal
how do i take the output in the terminal and make it a condition for the automation?
im quite new to home assistant.
the data is sent from my visual studio in windows 10 to the visual studio add on in home assistant and you can see it in the terminal of the visual studio add on in home assistant
and i use TCP i made my computer server and my home assistant a client
Instead of receiving the information in the VSCode terminal (where there is no way to forward to home assistant) setup either a restful, tcp or command line sensor in home assistant to receive the information.
There is no way to get data from the VSCode terminal into home assistant.
All the sensor options I linked to above require a command / response. Not a data stream. You are going to have to change your code. Look into mqtt. It can push messages to home assistant via a broker addon.