samsungtv platform allows you to control a Samsung Smart TV.
Go to the integrations page in your configuration and click on new integration -> Samsung TV. If your TV is on and you have enabled SSDP discovery, it’s likely that you just have to confirm the detected device.
When the TV is first connected, you will need to accept Home Assistant on the TV to allow communication.
YAML configuration is around for people that prefer YAML.
To use this integration, add the following to your
# Example configuration.yaml entry samsungtv: - host: IP_ADDRESS
Defines an action to turn the TV on.
After saving the YAML configuration, the TV must be turned on before launching Home Assistant in order for the TV to be registered the first time.
To wake up the TV when switched off you can use the wake-on-lan integration and call a service. This is not possible with every device.
wake_on_lan: samsungtv: - host: IP_ADDRESS turn_on_action: - service: wake_on_lan.send_magic_packet data: mac: MAC_ADDRESS
Changing channels can be done by calling the
with the following payload:
entity_id: media_player.samsung_tv media_content_id: 590 media_content_type: channel
It’s possible to switch between the 2 sources
You will need to install the
websocket-client Python package in your Home Assistant install. This will probably be done with:
pip3 install websocket-client
Remembering to activate your venv if you’re using a venv install.