Git Product home page Git Product logo

Comments (9)

ollo69 avatar ollo69 commented on June 28, 2024

What is this?
There is a issue template that you just ignore, and is impossible to understand what you are doing, what ha and integration version you are using, etc.
Please provide the requested details or I will close this issue.

from ha-samsungtv-smart.

montoyra avatar montoyra commented on June 28, 2024

Sorry in advance, let me use the template...sorry again:

Describe the bug
Action in automation doesn't work reporting an error: "Stopped because an error was encountered".
The automation is very simple, created with Automation designer: As an automation action I try to turn on the TV receiving the next error and the tracelog put in the previous message:

Stopped because an error was encountered

ACTION:
type: turn_on
device_id: 222b8bacbb28505875de88bd5962a570
entity_id: 45d0f695ca7149c207c0a0f46d158eb6
domain: remote

Expected behavior
Turn on the TV

Environment details:

  • Environment (HASSIO, Raspbian, etc): Home Assistant Container
  • Home Assistant version installed: core-2023.8.3
  • Component version installed: v0.12.0 (latest)
  • TV model: UE55KU6000 ([TV] Samsung 6 Series (55))

Output of HA logs

2023-09-23 15:41:38.928 DEBUG (MainThread) [custom_components.samsungtv_smart.api.upnp]
2023-09-23 15:41:44.471 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for device at pos 1:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 719, in _async_device_step
await device_action.async_call_action_from_config(
File "/usr/src/homeassistant/homeassistant/components/device_automation/action.py", line 71, in async_call_action_from_config
await platform.async_call_action_from_config(hass, config, variables, context)
File "/usr/src/homeassistant/homeassistant/components/remote/device_action.py", line 35, in async_call_action_from_config
await toggle_entity.async_call_action_from_config(
File "/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py", line 123, in async_call_action_from_config
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1255, in async_turn_on
await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1251, in turn_on
raise NotImplementedError()
NotImplementedError
2023-09-23 15:41:44.510 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140669442890176] Error handling message: Unknown error (unknown_error) ________________ from 192.168.1.85 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 716, in handle_execute_script
response = await script_obj.async_run(msg.get("variables"), context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1569, in async_run
return await asyncio.shield(run.async_run())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run
await self._async_step(log_exceptions=False)
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step
self._handle_exception(
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception
raise exception
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
await getattr(self, handler)()
File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 719, in _async_device_step
await device_action.async_call_action_from_config(
File "/usr/src/homeassistant/homeassistant/components/device_automation/action.py", line 71, in async_call_action_from_config
await platform.async_call_action_from_config(hass, config, variables, context)
File "/usr/src/homeassistant/homeassistant/components/remote/device_action.py", line 35, in async_call_action_from_config
await toggle_entity.async_call_action_from_config(
File "/usr/src/homeassistant/homeassistant/components/device_automation/toggle_entity.py", line 123, in async_call_action_from_config
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1255, in async_turn_on
await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1251, in turn_on
raise NotImplementedError()
NotImplementedError

thanks a lot for your support.

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on June 28, 2024

Ok, thanks for detail.
But I think that you are using wrong domain for this automation. If you want turn on TV using this integration domain should be media_player and not remote.

from ha-samsungtv-smart.

montoyra avatar montoyra commented on June 28, 2024

Hi, If I put media_player as domain, receive the following error message:

Integration 'media_player' does not support device automation actions

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on June 28, 2024

This does not make sense. Provide a screenshot of your automation.
Please also provide device diagnostic so that I can check integration status.

from ha-samsungtv-smart.

montoyra avatar montoyra commented on June 28, 2024

Hi.

Diagnostic status:

{
"home_assistant": {
"installation_type": "Home Assistant Container",
"version": "2023.8.3",
"dev": false,
"hassio": false,
"virtualenv": false,
"python_version": "3.11.4",
"docker": true,
"arch": "x86_64",
"timezone": "Europe/Madrid",
"os_name": "Linux",
"os_version": "6.1.0-11-amd64",
"run_as_root": true
},
"custom_components": {
"samsungtv_smart": {
"version": "0.12.0",
"requirements": [
"websocket-client!=1.4.0,>=0.58.0",
"wakeonlan>=2.0.0",
"aiofiles>=0.8.0",
"casttube>=0.2.1"
]
},
"hacs": {
"version": "1.32.1",
"requirements": [
"aiogithubapi>=22.10.1"
]
},
"config_editor": {
"version": "4.3",
"requirements": []
}
},
"integration_manifest": {
"domain": "samsungtv_smart",
"name": "SamsungTV Smart",
"codeowners": [
"@jaruba",
"@ollo69",
"@Screwdgeh"
],
"config_flow": true,
"dependencies": [],
"documentation": "https://github.com/ollo69/ha-samsungtv-smart",
"integration_type": "device",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/ollo69/ha-samsungtv-smart/issues",
"requirements": [
"websocket-client!=1.4.0,>=0.58.0",
"wakeonlan>=2.0.0",
"aiofiles>=0.8.0",
"casttube>=0.2.1"
],
"version": "0.12.0",
"is_built_in": false
},
"data": {
"entry": {
"entry_id": "604169a0e1cdad2a09d42076246d7e77",
"version": 1,
"domain": "samsungtv_smart",
"title": "Samsung_TV_Salon",
"data": {
"host": "192.168.1.45",
"name": "Samsung_TV_Salon",
"port": 8001,
"ws_name": "Casa",
"id": "30bdf200-dbc2-4041-b646-d680e325dd54",
"device_name": "[TV] Samsung 6 Series (55)",
"device_model": "UE55KU6000",
"device_os": "Tizen",
"mac": "REDACTED"
},
"options": {
"logo_option": 2,
"use_local_logo": true,
"app_load_method": 1,
"app_launch_method": 1,
"wol_repeat": 1,
"ping_port": 9197,
"use_mute_check": false,
"dump_apps": false,
"toggle_art_mode": false,
"sync_turn_off": [
"automation.tv_fuera_de_casa",
"media_player.tv_samsung_6_series_55"
],
"sync_turn_on": [
"automation.tv_fuera_de_casa",
"media_player.tv_samsung_6_series_55"
],
"app_list": {},
"channel_list": {},
"source_list": {}
},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "user",
"unique_id": "30bdf200-dbc2-4041-b646-d680e325dd54",
"disabled_by": null
},
"device": {
"name": "Samsung_TV_Salon",
"name_by_user": null,
"model": "UE55KU6000 ([TV] Samsung 6 Series (55))",
"manufacturer": "Samsung Electronics",
"sw_version": "Tizen",
"disabled": false,
"disabled_by": null,
"entities": {
"media_player.samsung_tv_salon": {
"name": "Samsung_TV_Salon",
"original_name": null,
"disabled": false,
"disabled_by": null,
"entity_category": null,
"device_class": null,
"original_device_class": "tv",
"icon": null,
"original_icon": null,
"unit_of_measurement": null,
"state": {
"state": "off",
"attributes": {
"source_list": [
"TV",
"HDMI"
],
"ip_address": "192.168.1.45",
"device_class": "tv",
"friendly_name": "Samsung_TV_Salon",
"supported_features": 24509
},
"last_changed": "2023-09-25T06:16:43.122065+00:00",
"last_updated": "2023-09-25T14:38:12.735220+00:00"
}
}
}
}
}
}

from ha-samsungtv-smart.

montoyra avatar montoyra commented on June 28, 2024

Samsung_Automation

I remove the HA Offical integration leaving only ha-samsungtv-smart integration and i don't have actions available to do the automation

I miss something, sorry...

from ha-samsungtv-smart.

ollo69 avatar ollo69 commented on June 28, 2024

Understood!!!
You shouldn't use device action, I think this would require other implementation currently not available.
You should just select service as action, and the service to call must be media_player.turn_on with TV entity as parameter.

from ha-samsungtv-smart.

montoyra avatar montoyra commented on June 28, 2024

WORKS!!!!...Many thanks

from ha-samsungtv-smart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.