home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.08k stars 29.15k forks source link

`cast.show_lovelace_view` appears to strip out query parameters from `view_path` #98316

Open felipecrs opened 11 months ago

felipecrs commented 11 months ago

The problem

I want to do the following:

service: cast.show_lovelace_view
data:
  view_path: "0?frigate-card-action:camera_select=portao"
  dashboard_path: frigate-card
  entity_id: media_player.tv_da_sala

I.e. pass a query parameter to the view_path, so that the casted page should be:

https://<my-hass>/frigate-card/0?frigate-card-action:camera_select=portao

However, apparently the query parameters are stripped out before being sent to the media player. The casted lovelace view behaves as if there was no query param at all.

What version of Home Assistant Core has the issue?

core-2023.8.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Cast

Link to integration documentation on our website

https://www.home-assistant.io/integrations/cast/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

Refs https://github.com/dermotduffy/frigate-hass-card/issues/1231

home-assistant[bot] commented 11 months ago

Hey there @emontnemery, mind taking a look at this issue as it has been labeled with an integration (cast) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `cast` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign cast` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


cast documentation cast source (message by IssueLinks)

Neonox31 commented 11 months ago

FYI on my side query params seems not to be striped out but the dashboard view is not found : 20230813_070852_F5FED3E9

Here is how I call the cast.show_lovelace_view service :

service: cast.show_lovelace_view
data:
  entity_id: media_player.kitchen_google_home
  dashboard_path: frigate-cameras
  view_path: default_view?frigate-card-action:camera_select=camera.garden_patio

And it's the same problem with media_player.play_media service :

service: media_player.play_media
data:
  entity_id: media_player.kitchen_google_home
  media_content_type: lovelace
  media_content_id: "frigate-cameras/default_view?frigate-card-action:camera_select=camera.garden_patio"

Note if I remove the ?frigate-card-action:camera_select=camera.garden_patio part, it works with both services.

felipecrs commented 11 months ago

@Neonox31 have you tried with 0 instead of default_view?

Neonox31 commented 10 months ago

@felipecrs Indeed, it seems to work using 0 instead of default_view, thanks a lot ! But I don't understand why !

Neonox31 commented 10 months ago

But camera selection doesn't occur, so I'm not sure that query params are correctly taken account using 0 😥

issue-triage-workflows[bot] commented 7 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

felipecrs commented 7 months ago

This is still valid and some feedback would be welcome.

issue-triage-workflows[bot] commented 4 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

felipecrs commented 4 months ago

This is still valid and some feedback would be welcome.

issue-triage-workflows[bot] commented 1 month ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

felipecrs commented 1 month ago

Still valid, tested this week.