Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valet Mode switch isn't working #85

Open
3 tasks done
Snuffy2 opened this issue May 18, 2024 · 5 comments
Open
3 tasks done

Valet Mode switch isn't working #85

Snuffy2 opened this issue May 18, 2024 · 5 comments

Comments

@Snuffy2
Copy link

Snuffy2 commented May 18, 2024

Checklist

  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

Turning the Valet Mode switch on/off isn't working. The error below appears every time it is switched.

Reproduction steps

  1. Turn Valet Mode on or off
    ...

Debug logs

VehicleSpecific.set_valet_mode() missing 1 required positional argument: 'password'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/trace.py", line 284, in async_wrapper
    await func(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 952, in _async_repeat_step
    await async_run_sequence(iteration)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 856, in async_run_sequence
    await self._async_run_script(script)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1210, in _async_run_script
    result = await self._async_run_long_action(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1731, in async_run
    return await asyncio.shield(create_eager_task(run.async_run()))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 503, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 501, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 736, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 699, in _async_run_long_action
    return await long_task
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2738, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2779, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1047, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/teslemetry/switch.py", line 192, in async_turn_off
    await self.handle_command(self.entity_description.off_func(self.api))
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/teslemetry/switch.py", line 56, in <lambda>
    off_func=lambda api: api.set_valet_mode(on=False),
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: VehicleSpecific.set_valet_mode() missing 1 required positional argument: 'password'
@Bre77
Copy link
Contributor

Bre77 commented May 19, 2024

Ok I will have to remove this entity and turn it into a custom service since password is required and the Home Assistant project wont let me use the lock platform for these. Thanks for raising this issue.

@Snuffy2 Snuffy2 changed the title Valet Mode switch isn't working working Valet Mode switch isn't working Jun 5, 2024
@Snuffy2
Copy link
Author

Snuffy2 commented Jun 5, 2024

Is there a different way to enable/disable Valet Mode using a service or some other process I can use?

@Bre77
Copy link
Contributor

Bre77 commented Jun 6, 2024

Pushed an update just now with a custom service for valet mode. https://github.com/Teslemetry/hass-teslemetry/releases/tag/v1.9.12

@Snuffy2
Copy link
Author

Snuffy2 commented Jun 6, 2024

I may be missing it, but I'm not seeing a valet mode (or set speed limit) service in HA after updating to v1.9.12.
SNAG-3475

@Bre77
Copy link
Contributor

Bre77 commented Jun 7, 2024

Yes there was an issue with the release, .13 has the services now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants