Code Monkey home page Code Monkey logo

home-assistant-custom-components-saver's Introduction

stars_badge followers_badge Community Forum Ko-Fi buycoffee.to PayPal.Me Revolut.Me

GitHub stats

Custom components

Name Stars Version HACS support Downloads Last commit Forum
Antistorm stars_badge release_badge HACS Default Downloads Last commit
Burze.dzis.net stars_badge release_badge HACS Default Downloads Last commit
Custom Templates stars_badge release_badge HACS Default Downloads Last commit community_badge
Dom 5 stars_badge release_badge HACS Custom Downloads Last commit
Froggy stars_badge release_badge HACS Custom Downloads Last commit
GNE Photovoltaic Monitoring stars_badge release_badge HACS Default Downloads Last commit
Google Keep stars_badge release_badge HACS Default Downloads Last commit community_badge
Hydro IMGW stars_badge release_badge HACS Custom Downloads Last commit
iMPK stars_badge release_badge HACS Default Downloads Last commit
Looko2 stars_badge release_badge HACS Default Downloads Last commit
MPK Łódź stars_badge release_badge HACS Custom Downloads Last commit
MPK Kraków stars_badge release_badge HACS Custom Downloads Last commit
MPK Rzeszów stars_badge release_badge HACS Custom Downloads Last commit
Rozkładzik stars_badge release_badge HACS Default Downloads Last commit
Saver stars_badge release_badge HACS Default Downloads Last commit community_badge
SmartThings Soundbar stars_badge release_badge HACS Custom Downloads Last commit
Tauron AMIplus stars_badge release_badge HACS Default Downloads Last commit
Xiaomi Cloud Map Extractor stars_badge release_badge HACS Default Downloads Last commit Community Forum
Xiaomi Vacuum Map Camera stars_badge release_badge HACS Custom Downloads Last commit

Custom Lovelace cards

Name Stars Version HACS support Downloads Last commit Forum
Google Keep card stars_badge release_badge HACS Default Last commit community_badge
HTML card stars_badge release_badge HACS Default Last commit
HTML Jinja2 Template card stars_badge release_badge HACS Default Last commit community_badge
Local Conditional card stars_badge release_badge HACS Default Downloads Last commit community_badge
Nixie card stars_badge release_badge HACS Custom Downloads Last commit
Nixie Clock card stars_badge release_badge HACS Custom Downloads Last commit
Xiaomi Vacuum Map card stars_badge release_badge HACS Default Downloads Last commit community_badge

Clients

Name Stars Version Downloads Last commit Forum
Home Assistant Taskbar Menu stars_badge release_badge Downloads Last commit Community Forum

Picture-elements cards

Name Stars Last commit
Xiaomi Vacuum Black card stars_badge Last commit

Others

Name Stars Version Downloads Last commit Forum
Xiaomi Vacuum garage stars_badge Last commit community_badge
Xiaomi Cloud Token Extractor stars_badge release_badge Downloads Last commit

Support

If you want to support my work with a donation you can use one of the following platforms:

Platform Payment methods Link Comment
Ko-fi
  • PayPal
  • Credit card
  • Buy Me a Coffee at ko-fi.com
  • No fees
  • Single or monthly payment
  • buycoffee.to
  • BLIK
  • Bank transfer
  • Postaw mi kawę na buycoffee.to
    PayPal
  • PayPal
  • PayPal Logo
  • No fees
  • Revolut
  • Revolut
  • Credit Card
  • Revolut
  • No fees
  • home-assistant-custom-components-saver's People

    Contributors

    matfax avatar piotrmachowski avatar

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    Watchers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    home-assistant-custom-components-saver's Issues

    How to save/delete/restore all the entites in one call-service command?

    Hi @PiotrMachowski ,

    I usually use following:

    service: saver.save_state
    data:
      entity_id: specific_domain.specific_entity
    

    However, I need to list all the entities I want to save, in a separate line. But what if I need to save all the entities when leaving home and then restore them when coming back home? So, I'm wondering if there is any chance to save all the entities at once?

    I would expect the following useful ideas to be implemented:

    1. Save all the available entities:
    service: saver.save_state
    data:
      entity_id: [all]
    
    1. Save all the entities from the same domain:
    service: saver.save_state
    data:
      entity_id: specific_domain.all
    
    1. Save all the entities except those being excluded:
    service: saver.save_state
    data:
      entity_id: switch.all
        excluded_entities:
          - switch.kitchen_coffeemaker
          - switch.any_other_example
    

    The same approach would be applicable to other services: delete, restore, etc.

    Not working, for some reason

    Not sure why, but it is not working at the moment (I'm on today's latest builds on Home Assistant OS, updating all components every day).

    Installed via HACS, config.yaml "saver:" is there, integration is installed, service is available, nothing special in the logs related. Trying both with variables and entities:
    image

    But template engine is always "None"

    image

    same with the automation where I'm trying to apply it. Is there anything I'm missing?

    Using "saver" as a workaround to generate persistent "on the fly" scenes.

    Hi, wondering if "saver" could be used as a workaround to generate persistent "on the fly" scenes?

    See more context here:

    https://community.home-assistant.io/t/wth-is-there-no-service-to-update-the-values-stored-in-a-scene/477999

    Maybe I'm oversimplifying this but it seems all that's missing is a way to have multiple "saver" variables/names (saver1, saver2, etc.) and hopefully make them persistent.

    Let me know if this is feasible or open to your suggestions for workarounds to make scene.create persistent.

    Thanks in advance.

    test saver component

    hello and congratulations for the component. I have installed the component using your instructions and would like to know how I can check if the component is working and save the data. I have this doubt because I don't get any data when I recall the data I saved with the save_state service. Thank you

    Produces "unknown error" in template

    After installing, some of my automation/scripts stop working. Finally, I've found that some templates were not working
    image

    After disabling the integration (saver), everything goes back to normal.

    image

    Cheers,
    Paco

    How to restore a text string + restoring state also deletes the saved state.

    Hi!

    I've started to understand how Saver works and got it mostly working. However for my AC units they require a string and I can't figure out how to restore that.

    At the moment I got the temperature to restore but I can't figure out how to get the hvac_mode to work. It can be off, heat, cool.

    service: saver.restore_state
    data:
      entity_id: climate.new_living_room_ac
      restore_script:
        - service: climate.set_temperature
          data_template:
            entity_id: climate.new_living_room_ac
            temperature: "{{ '{{ attr_temperature | int }}'}}"
            hvac_mode: "{{ {{ attr_state | string  }}'}}"
          target:
            entity_id: climate.new_living_room_ac
    
    

    The state stored in saver.saver:

    entities:
      climate.new_living_room_ac:
        entity_id: climate.new_living_room_ac
        state: cool
        attributes:
          hvac_modes:
            - 'off'
            - heat
            - cool
          min_temp: 16
          max_temp: 31
          current_temperature: 23.7
          temperature: 22
          current_humidity: 56
          hvac_action: cooling
          friendly_name: New living room AC
          supported_features: 1
        last_changed: '2023-09-09T16:05:27.713246+00:00'
        last_updated: '2023-09-09T16:07:14.049819+00:00'
        context:
          id: 01H9XB50W1WKFMZGQ68BVMXEYC
          parent_id: null
          user_id: null
    variables: {}
    friendly_name: saver
    

    I've tried to read up on templating on the docs page and HA forum posts but it's all way above my head.

    Also any time I restore the saved state, it gets deleted and saver.saver becomes empty.

    not restore state save

    Hello
    I have this scripts for save and restore state but fault

    alias: Estado iniciales
    sequence:
      - service: saver.save_state
        data:
          entity_id: climate.termostato_radiador_garaje
    mode: single
    
    alias: Restaurar estados iniciales
    sequence:
      - service: saver.restore_state
        data:
          entity_id: climate.termostato_radiador_garaje
          restore_script:
            - service: input_text.set_value
              data_template:
                entity_id: input_text.estado_prueba
                value: '{{ attr_hvac_action }}'
    mode: single
    
    alias: Restaurar estados iniciales 2
    sequence:
      - service: saver.restore_state
        data:
          entity_id: climate.termostato_radiador_garaje
          restore_script:
            - service: input_text.set_value
              data_template:
                entity_id: input_text.estado_prueba
                value: '{{ state }}'
    mode: single
    

    The entety estado_prueba don´t actualize

    help me please

    Information required

    Hi, sorry - I don't know, where I should put this questions instead... therefore, sorry for using this section...

    I am running some custom sensors which calculate measurements from my solaredge integration:

    • monthly Energy Production per kWp
    • yearly Energy Production per kWp

    as well as some other statistics.

    I would like to know, if this integration is able to store these values (preferred when the timeframe for their measurement ends, end of the month, end of the year...)
    And if the states could be saved in the database...

    In this case, I would be able to create a statistic with SQL Sensors for example and use the states to compare the production from last month with the current month, etc.

    How to use variables in scripts

    The documentation explains how to set a variable, and it works when you check the state of the saver entity in the developer tools, but how do you use that variable in a script?

    I don't see anything in the code that returns said variable.

    Not compatible with Python 3.11

    After updating Python to 3.11 this component is failing:

    2023-05-10 10:20:32.082 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing component custom_components.saver
    Traceback (most recent call last):
      File "/srv/hass/lib/python3.11/site-packages/homeassistant/loader.py", line 813, in get_component
        ComponentProtocol, importlib.import_module(self.pkg_path)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 940, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "/home/hass/.homeassistant/custom_components/saver/__init__.py", line 77, in <module>
        class SaverEntity(RestoreEntity):
      File "/home/hass/.homeassistant/custom_components/saver/__init__.py", line 149, in SaverEntity
        @asyncio.coroutine
         ^^^^^^^^^^^^^^^^^
    AttributeError: module 'asyncio' has no attribute 'coroutine'
    

    Unable to restore state using attributes

    Ran save state on a climate entity. I'm able to reference state via template using:

    {{ state_attr('saver.saver', 'entities')['climate.dyson_air'].state == 'heat' }}
    

    But the following restore script doesn't work at all (using it inside of a "Choose" block in this case):

    service: saver.restore_state
    data:
      entity_id: climate.dyson_air
      delete_after_run: false
      restore_script:
        - service: climate.set_temperature
          data_template:
            entity_id: climate.dyson_air
            temperature: '{{ attr_temperature | float }}'
    

    Error rendering data template: UndefinedError: 'attr_temperature' is undefined

    Here is the entity information:

    entities: 
    climate.dyson_air:
      entity_id: climate.dyson_air
      state: heat
      attributes:
        hvac_modes:
          - cool
          - heat
        min_temp: 34
        max_temp: 99
        fan_modes:
          - focus
          - diffuse
        current_temperature: 72
        temperature: 79
        current_humidity: 53
        fan_mode: focus
        hvac_action: heating
        friendly_name: Dyson Air
        supported_features: 9
    

    Script constructor has been changed

    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 206, in _async_step
        await getattr(
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 413, in _async_call_service_step
        await service_task
      File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call
        task.result()
      File "/usr/src/homeassistant/homeassistant/core.py", line 1354, in _execute_service
        await self._hass.async_add_executor_job(handler.func, service_call)
      File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/config/custom_components/saver/__init__.py", line 53, in restore_state
        saver_entity.restore(entity_id, restore_script, should_delete)
      File "/config/custom_components/saver/__init__.py", line 116, in restore
        script = Script(self.hass, restore_script)
    TypeError: __init__() missing 2 required positional arguments: 'name' and 'domain'
    

    Restore whole entity

    Hi there,

    Thanks for this integration, it seems quite interesting but I believe it is missing one little feature (unless I didn't understand the docs).

    Would be possible to have a single command to restore a saved entity completely?
    The goal would be, for example, to store a light state, change it (ex. alarm triggered) and restore it exactly as it was but without having to specify every specific attribute, so basically the goal would be calling:

    service: saver.restore_state
    data:
      entity_id: cover.living_room
    

    And automatically restore the entity state and all the attributes ast they were.

    Would this be possible? If so it would make the use way easier :)

    Thanks
    Andrea

    no unique ID

    Many thanks for the great extension.

    There is one point that is not really convincing.
    When I want to configure the extension via the UI (hide) I get the following error message:

    This entity ("saver.saver") does not have a unique ID, therefore the settings cannot be managed via the UI.

    Is it possible to assign a unique ID to the extension?

    error after update

    Hi, i have follow errors after upgrade saver in HACS, it seems regard card_mod integration.

    Error 1

    Logger: homeassistant.components.history_stats.helpers
    Source: helpers/template.py:570
    Integration: history_stats (documentation, issues)
    First occurred: 15:59:43 (99 occurrences)
    Last logged: 16:10:50
    
    Error parsing template for field start
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 568, in async_render
        render_result = _render_with_context(self.template, compiled, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2198, in _render_with_context
        return template.render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "<template>", line 1, in top-level template code
      File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 391, in call
        if not __self.is_safe_callable(__obj):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [Previous line repeated 973 more times]
      File "/config/custom_components/saver/__init__.py", line 74, in is_safe_callable
        return (isinstance(obj, (SaverVariableTemplate, SaverEntityTemplate))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded in __instancecheck__
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/components/history_stats/helpers.py", line 39, in async_calculate_period
        rendered = template.async_render()
                   ^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 570, in async_render
        raise TemplateError(err) from err
    homeassistant.exceptions.TemplateError: RecursionError: maximum recursion depth exceeded in __instancecheck__
    

    Error 2

    Logger: homeassistant
    Source: helpers/template.py:570
    First occurred: 16:01:00 (3 occurrences)
    Last logged: 16:09:01
    
    Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 568, in async_render
        render_result = _render_with_context(self.template, compiled, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2198, in _render_with_context
        return template.render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "<template>", line 1, in top-level template code
      File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 391, in call
        if not __self.is_safe_callable(__obj):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [Previous line repeated 975 more times]
      File "/config/custom_components/saver/__init__.py", line 74, in is_safe_callable
        return (isinstance(obj, (SaverVariableTemplate, SaverEntityTemplate))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded in __instancecheck__
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/components/history_stats/coordinator.py", line 93, in _async_update_from_event
        self.async_set_updated_data(await self._history_stats.async_update(event))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/components/history_stats/data.py", line 67, in async_update
        self._period = async_calculate_period(self._duration, self._start, self._end)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/components/history_stats/helpers.py", line 39, in async_calculate_period
        rendered = template.async_render()
                   ^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 570, in async_render
        raise TemplateError(err) from err
    homeassistant.exceptions.TemplateError: RecursionError: maximum recursion depth exceeded in __instancecheck__
    

    Error 3

    Questo errore ha avuto origine da un'integrazione personalizzata.
    
    Logger: homeassistant
    Source: custom_components/saver/__init__.py:74
    Integration: Saver (documentation, issues)
    First occurred: 16:08:49 (2 occurrences)
    Last logged: 16:08:50
    
    Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 233, in _handle_refresh_interval
        await self._async_refresh(log_failures=True, scheduled=True)
      File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 389, in _async_refresh
        self.async_update_listeners()
      File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 172, in async_update_listeners
        update_callback()
      File "/usr/src/homeassistant/homeassistant/components/scrape/sensor.py", line 232, in _handle_coordinator_update
        self._async_update_from_rest_data()
      File "/usr/src/homeassistant/homeassistant/components/scrape/sensor.py", line 206, in _async_update_from_rest_data
        value = template.async_render_with_possible_json_value(value, None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 747, in async_render_with_possible_json_value
        return _render_with_context(self.template, compiled, **variables).strip()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2198, in _render_with_context
        return template.render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "<template>", line 1, in top-level template code
      File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 391, in call
        if not __self.is_safe_callable(__obj):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [Previous line repeated 973 more times]
      File "/config/custom_components/saver/__init__.py", line 74, in is_safe_callable
        return (isinstance(obj, (SaverVariableTemplate, SaverEntityTemplate))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded in __instancecheck__
    

    Error 4

    Logger: homeassistant.helpers.event
    Source: helpers/template.py:570
    First occurred: 15:58:57 (283 occurrences)
    Last logged: 16:06:28
    
    Error while processing template: Template<template=(mushroom-shape-icon { {% if is_state(config.entity, 'on') %} --card-mod-icon: mdi:connection; {% else %} --card-mod-icon: mdi:connection; {% endif %} display: flex; }) renders=22>
    Error while processing template: Template<template=(ha-card { width: 66px; top: -66px; } ha-state-icon { transform-origin: 67% 67%; clip-path: circle(17% at 67% 67%); {% if is_state(config.entity, 'on') %} --icon-color: rgba(var(--rgb-blue), 1); animation: spin 1s linear infinite; {% else %} {% endif %} }) renders=22>
    Error while processing template: Template<template=(Settimanale {{ states('sensor.frigorifero_ore_giornaliere') | round(0) }} h/gg {{ states('sensor.frigorifero_settimanale') | round(0) }} kWh {{ states('sensor.frigorifero_settimanale_costo') | round(0) }} €) renders=42>
    Error while processing template: Template<template=(Mensile {{ states('sensor.frigorifero_ore_mensile') | round(0) }} h {{ states('sensor.frigorifero_mensile') | round(0) }} kWh {{ states('sensor.frigorifero_mensile_costo') | round(0) }} €) renders=42>
    Error while processing template: Template<template=(Annuale {{ states('sensor.frigorifero_ore_annuale') | round(0) }} h {{ states('sensor.frigorifero_annuale') | round(0) }} kWh {{ states('sensor.frigorifero_annuale_costo') | round(0) }} €) renders=42>
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 568, in async_render
        render_result = _render_with_context(self.template, compiled, **kwargs)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2198, in _render_with_context
        return template.render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "<template>", line 1, in top-level template code
      File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 391, in call
        if not __self.is_safe_callable(__obj):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [Previous line repeated 970 more times]
      File "/config/custom_components/saver/__init__.py", line 74, in is_safe_callable
        return (isinstance(obj, (SaverVariableTemplate, SaverEntityTemplate))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded in __instancecheck__
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 694, in async_render_to_info
        render_info._result = self.async_render(
                              ^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 570, in async_render
        raise TemplateError(err) from err
    homeassistant.exceptions.TemplateError: RecursionError: maximum recursion depth exceeded in __instancecheck__
    

    Error 5

    Questo errore ha avuto origine da un'integrazione personalizzata.
    
    Logger: homeassistant
    Source: custom_components/saver/__init__.py:89
    Integration: Saver (documentation, issues)
    First occurred: 15:59:06 (1 occurrences)
    Last logged: 15:59:06
    
    Error doing job: Task exception was never retrieved
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 701, in _async_enable_automation
        self._async_detach_triggers = await self._async_attach_triggers(True)
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 755, in _async_attach_triggers
        variables = self._trigger_variables.async_render(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/script_variables.py", line 62, in async_render
        rendered_variables[key] = template.render_complex(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 239, in render_complex
        return value.async_render(variables, limited=limited, parse_result=parse_result)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 562, in async_render
        compiled = self._compiled or self._ensure_compiled(limited, strict, log_fn)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 783, in _ensure_compiled
        env = self._env
              ^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 500, in _env
        ret = self.hass.data[wanted_env] = TemplateEnvironment(
                                           ^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 89, in patched_init
        self.saver_original__init__(hass_param, limited, strict, log_fn)
      File "/config/custom_components/saver/__init__.py", line 89, in patched_init
        self.saver_original__init__(hass_param, limited, strict, log_fn)
      File "/config/custom_components/saver/__init__.py", line 89, in patched_init
        self.saver_original__init__(hass_param, limited, strict, log_fn)
      [Previous line repeated 977 more times]
    RecursionError: maximum recursion depth exceeded
    

    Erorr 6

    Logger: homeassistant.components.template.template_entity
    Source: components/template/template_entity.py:478
    Integration: Template (documentation, issues)
    First occurred: 15:58:57 (36 occurrences)
    Last logged: 15:59:06
    
    TemplateError('RecursionError: maximum recursion depth exceeded in __instancecheck__') while processing template 'Template<template=({{ (((states('sensor.forno_mensile')|float(default=0)) * (states('input_number.costo_energia')|float(default=0)))) | round(2, default=0) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.forno_mensile_costo'
    TemplateError('RecursionError: maximum recursion depth exceeded in __instancecheck__') while processing template 'Template<template=({{ (((states('sensor.forno_settimanale')|float(default=0)) * (states('input_number.costo_energia')|float(default=0)))) | round(2, default=0) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.forno_settimanale_costo'
    TemplateError('RecursionError: maximum recursion depth exceeded in __instancecheck__') while processing template 'Template<template=({{ (((states('sensor.condizionatori_annuali')|float(default=0)) * (states('input_number.costo_energia')|float(default=0)))) | round(2, default=0) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.condizionatori_annuali_costo'
    TemplateError('RecursionError: maximum recursion depth exceeded in __instancecheck__') while processing template 'Template<template=({{ (((states('sensor.condizionatori_mensili')|float(default=0)) * (states('input_number.costo_energia')|float(default=0)))) | round(2, default=0) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.condizionatori_mensili_costo'
    TemplateError('RecursionError: maximum recursion depth exceeded in __instancecheck__') while processing template 'Template<template=({{ (((states('sensor.condizionatori_settimanali')|float(default=0)) * (states('input_number.costo_energia')|float(default=0)))) | round(2, default=0) }}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.condizionatori_settimanali_costo'
    

    Error 7

    Logger: homeassistant.components.sensor
    Source: custom_components/saver/__init__.py:74
    Integration: Sensore (documentation, issues)
    First occurred: 15:58:48 (4 occurrences)
    Last logged: 15:58:50
    
    Error adding entities for domain sensor with platform scrape
    Error while setting up scrape platform for sensor
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
        await asyncio.gather(*tasks)
      File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
        await entity.add_to_platform_finish()
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1001, in add_to_platform_finish
        await self.async_added_to_hass()
      File "/usr/src/homeassistant/homeassistant/components/scrape/sensor.py", line 198, in async_added_to_hass
        self._async_update_from_rest_data()
      File "/usr/src/homeassistant/homeassistant/components/scrape/sensor.py", line 206, in _async_update_from_rest_data
        value = template.async_render_with_possible_json_value(value, None)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 747, in async_render_with_possible_json_value
        return _render_with_context(self.template, compiled, **variables).strip()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 2198, in _render_with_context
        return template.render(**kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
        self.environment.handle_exception()
      File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "<template>", line 1, in top-level template code
      File "/usr/local/lib/python3.11/site-packages/jinja2/sandbox.py", line 391, in call
        if not __self.is_safe_callable(__obj):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/config/custom_components/saver/__init__.py", line 75, in is_safe_callable
        or self.saver_original_is_safe_callable_old(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      [Previous line repeated 974 more times]
      File "/config/custom_components/saver/__init__.py", line 74, in is_safe_callable
        return (isinstance(obj, (SaverVariableTemplate, SaverEntityTemplate))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded in __instancecheck__
    

    If i disable saver component and restart HA, card_mod work well...
    Can anyone help me?

    Cant restore state

    Can someone help pe to restore a door sensor state pls. I did an automation and în data template i put the entity of The sensor. What exactly am i doing wrong?

    wled effect

    please tell me the script, there is a wled tape. I want to save its effect state, change the effect, and then return the effect back

    alias: test
    sequence:

    service: saver.save_state
    data:
    entity_id: light.wled
    delay: ‘00:00:05’
    service: wled.effect
    data:
    entity_id: light.wled
    effect: police
    delay: ‘00:00:05’
    service: saver.restore_state
    data:
    entity_id: light.wled
    entity_id: saver.saver
    mode: single

    All wled seeting:

    min_mireds: 153
    max_mireds: 500
    effect_list: Android, Blink, Blink Rainbow, Bouncing Balls, Bpm, Breathe, Candle, Candle Multi, Chase, Chase Flash, Chase Flash Rnd, Chase Rainbow, Chase Random, Chunchun, Circus, Colorful, Colorloop, Colortwinkles, Colorwaves, Dancing Shadows, Dissolve, Dissolve Rnd, Drip, Dynamic, Fade, Fill Noise, Fire 2012, Fire Flicker, Fireworks, Fireworks 1D, Fireworks Starburst, Flow, Glitter, Gradient, Halloween, Halloween Eyes, Heartbeat, ICU, Juggle, Lake, Lighthouse, Lightning, Loading, Merry Christmas, Meteor, Meteor Smooth, Multi Comet, Noise 1, Noise 2, Noise 3, Noise 4, Noise Pal, Oscillate, Pacifica, Palette, Percent, Phased, Phased Noise, Plasma, Police, Police All, Popcorn, Pride 2015, Railway, Rain, Rainbow, Rainbow Runner, Random Colors, Red & Blue, Ripple, Ripple Rainbow, Running, Running 2, Saw, Scan, Scan Dual, Scanner, Scanner Dual, Sine, Sinelon, Sinelon Dual, Sinelon Rainbow, Solid, Solid Glitter, Solid Pattern, Solid Pattern Tri, Sparkle, Sparkle Dark, Sparkle+, Spots, Spots Fade, Stream, Stream 2, Strobe, Strobe Mega, Strobe Rainbow, Sunrise, Sweep, Sweep Random, Theater, Theater Rainbow, Traffic Light, Tri Chase, Tri Fade, Tri Wipe, Twinkle, Twinklecat, Twinklefox, Twinkleup, Two Areas, Two Dots, Washing Machine, Wipe, Wipe Random
    brightness: 255
    hs_color: 37.412, 100
    rgb_color: 255, 159, 0
    xy_color: 0.57, 0.41
    effect: Solid
    intensity: 128
    palette: Default
    playlist: null
    preset: null
    reverse: false
    speed: 128
    friendly_name: WLED
    icon: mdi:led-strip-variant
    supported_features: 55

    Saving two media_player states and then trying to restore, result in error

    If I save only one state of the two media players it runs fine, but when I try to save two it goes into error.
    My automation first run:
    action:

      - service: saver.save_state
        data:
          entity_id: media_player.home_mini
      - service: saver.save_state
        data:
          entity_id: media_player.nest_mini

    then play a message on the group of the two media_player (an announce) and then I try to restore in this way:

      - service: saver.restore_state
        data:
          entity_id: media_player.home_mini
          restore_script:
            data:
              media_content_type: >-
                {{
                state_attr('saver.saver','entities')['media_player.home_mini'].attributes.media_content_type
                if
                state_attr('saver.saver','entities')['media_player.home_mini'].attributes.media_content_type
                is defined and
                state_attr('saver.saver','entities')['media_player.home_mini'].attributes.media_content_type
                != none else 'music' }}
              media_content_id: >-
                {{
                state_attr('saver.saver','entities')['media_player.home_mini'].attributes.media_content_id
                if
                state_attr('saver.saver','entities')['media_player.home_mini'].attributes.media_content_id
                is defined and
                state_attr('saver.saver','entities')['media_player.home_mini'].attributes.media_content_id
                != none else 'none' }}
            service: media_player.play_media
            target:
              entity_id: media_player.home_mini
        enabled: true
      - service: saver.restore_state
        data:
          entity_id: media_player.nest_mini
          restore_script:
            data:
              media_content_type: >-
                {{
                state_attr('saver.saver','entities')['media_player.nest_mini'].attributes.media_content_type
                if
                state_attr('saver.saver','entities')['media_player.nest_mini'].attributes.media_content_type
                is defined and
                state_attr('saver.saver','entities')['media_player.nest_mini'].attributes.media_content_type
                != none else 'music' }}
              media_content_id: >-
                {{
                state_attr('saver.saver','entities')['media_player.nest_mini'].attributes.media_content_id
                if
                state_attr('saver.saver','entities')['media_player.nest_mini'].attributes.media_content_id
                is defined and
                state_attr('saver.saver','entities')['media_player.nest_mini'].attributes.media_content_id
                != none else 'none' }}
            service: media_player.play_media
            target:
              entity_id: media_player.nest_mini
        enabled: true

    and I receive the following error:

    2022-05-31 18:07:42 ERROR (MainThread) [homeassistant.helpers.script.saver] saver: Error executing script. Unexpected error for call_service at pos 1: string index out of range
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
        await getattr(self, handler)()
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
        await service_task
      File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
        task.result()
      File "/usr/src/homeassistant/homeassistant/core.py", line 1664, in _execute_service
        await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
      File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
        await service.entity_service_call(
      File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
        future.result()  # pop exception if have
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
        await coro
      File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
        await result
      File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 657, in async_play_media
        media_id = async_process_play_media_url(self.hass, media_id)
      File "/usr/src/homeassistant/homeassistant/components/media_player/browse_media.py", line 45, in async_process_play_media_url
        if media_content_id[0] != "/":
    IndexError: string index out of range
    2022-05-31 18:07:43 ERROR (MainThread) [homeassistant.components.automation.new_automation_2] Alert - Bedroom Light Still On: Error executing script. Unexpected error for call_service at pos 8: string index out of range
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
        await getattr(self, handler)()
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
        await service_task
      File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
        task.result()
      File "/usr/src/homeassistant/homeassistant/core.py", line 1670, in _execute_service
        await self._hass.async_add_executor_job(
      File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/config/custom_components/saver/__init__.py", line 53, in restore_state
        saver_entity.restore(entity_id, restore_script, should_delete)
      File "/config/custom_components/saver/__init__.py", line 117, in restore
        script.run(variables=variables, context=Context())
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1416, in run
        asyncio.run_coroutine_threadsafe(
      File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 445, in result
        return self.__get_result()
      File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
        raise self._exception
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
        await asyncio.shield(run.async_run())
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
        await self._async_step(log_exceptions=False)
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
        self._handle_exception(
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
        raise exception
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
        await getattr(self, handler)()
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
        await service_task
      File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
        task.result()
      File "/usr/src/homeassistant/homeassistant/core.py", line 1664, in _execute_service
        await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
      File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
        await service.entity_service_call(
      File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
        future.result()  # pop exception if have
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
        await coro
      File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
        await result
      File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 657, in async_play_media
        media_id = async_process_play_media_url(self.hass, media_id)
      File "/usr/src/homeassistant/homeassistant/components/media_player/browse_media.py", line 45, in async_process_play_media_url
        if media_content_id[0] != "/":
    IndexError: string index out of range
    2022-05-31 18:07:43 ERROR (MainThread) [homeassistant.components.automation.new_automation_2] While executing automation automation.new_automation_2
    Traceback (most recent call last):
      File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 521, in async_trigger
        await self.action_script.async_run(
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
        await asyncio.shield(run.async_run())
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
        await self._async_step(log_exceptions=False)
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
        self._handle_exception(
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
        raise exception
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
        await getattr(self, handler)()
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
        await service_task
      File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
        task.result()
      File "/usr/src/homeassistant/homeassistant/core.py", line 1670, in _execute_service
        await self._hass.async_add_executor_job(
      File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/config/custom_components/saver/__init__.py", line 53, in restore_state
        saver_entity.restore(entity_id, restore_script, should_delete)
      File "/config/custom_components/saver/__init__.py", line 117, in restore
        script.run(variables=variables, context=Context())
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1416, in run
        asyncio.run_coroutine_threadsafe(
      File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 445, in result
        return self.__get_result()
      File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result
        raise self._exception
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1513, in async_run
        await asyncio.shield(run.async_run())
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 405, in async_run
        await self._async_step(log_exceptions=False)
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 449, in _async_step
        self._handle_exception(
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 472, in _handle_exception
        raise exception
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 447, in _async_step
        await getattr(self, handler)()
      File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 680, in _async_call_service_step
        await service_task
      File "/usr/src/homeassistant/homeassistant/core.py", line 1627, in async_call
        task.result()
      File "/usr/src/homeassistant/homeassistant/core.py", line 1664, in _execute_service
        await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
      File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
        await service.entity_service_call(
      File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 677, in entity_service_call
        future.result()  # pop exception if have
      File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 964, in async_request_call
        await coro
      File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 714, in _handle_entity_call
        await result
      File "/usr/src/homeassistant/homeassistant/components/cast/media_player.py", line 657, in async_play_media
        media_id = async_process_play_media_url(self.hass, media_id)
      File "/usr/src/homeassistant/homeassistant/components/media_player/browse_media.py", line 45, in async_process_play_media_url
        if media_content_id[0] != "/":
    IndexError: string index out of range
    

    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.