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

ValueError("A relative URL was received on '{entity}.{attribute}'. #72

Open
Dean98T opened this issue Sep 25, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@Dean98T
Copy link

Dean98T commented Sep 25, 2024

In the logs for the AppDaemon app whenever I run this, as soon as the Spotify entity picture changes, with it being a relative URL, I get the following error message:

  File `/config/apps/media_lights_sync.py`, line 174, in format_url
    raise ValueError("A relative URL was received on '{entity}.{attribute}'.\nha_url must be specified in the configuration for relative URLs.".format(
ValueError: A relative URL was received on 'media_player.spotify_dean_taylor.entity_picture'.
ha_url must be specified in the configuration for relative URLs.

CONFIG:

APP

media_lights_sync:
  module: media_lights_sync
  class: MediaLightsSync
  media_player: media_player.spotify_dean_taylor
  lights:
    - light.left_lamp
    - light.right_lamp
    - light.office_light
  ha_url: http://homeassistant.local:8123/
  reset_lights_after: true
  use_saturated_colors: false
  use_current_brightness: false

APPDAEMON

appdaemon:
  latitude: *
  longitude: *
  elevation: 30
  time_zone: Europe/London
  plugins:
    HASS:
      type: hass
      ha_url: http://homeassistant.local:8123/
      token: *
@Dean98T Dean98T added the bug Something isn't working label Sep 25, 2024
@ericmatte
Copy link
Owner

You are receiving this error because your ha_url does not seems to be recognized by the script. This error will only be thrown if if not is_absolute and self.ha_url is None (ref)

Could you try restarting your AppDaemon?

Or maybe try switching it up for your server IP address: ha_url: http://192.168.0.199:8123/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants