Input Number/Volume Slider for Yamaha Receiver & Google home

no, the jinja goes in the data_template inside your action:

action:
  - service: input_number.set_value
    data_template:
      entity_id: >-
        {% set room = trigger.entity_id.split(".")[1] | replace("_changed", "") %}
        {% set entity = ["input_number",room]|join(".") %}
        {{entity}}
      value: >-
        {% set room = trigger.entity_id.split(".")[1] | replace("_volume_changed", "") %}
        {% if room == "goole_home" %}
          {{states.sensor.google_home_volume.state }}
        {% elif room == "yamaha" %}
          {{states.sensor.yamaha_volume.state }}
        {% endif %}

Your trigger remains untouched from your original code.

Thanks for your help petro, i have now this error in the log:

2018-01-19 14:20:39 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID {% set room = trigger.entity_id.split(".")[1] | replace("_changed" is an invalid entity id for dictionary value @ data['action'][0]['entity_id']. Got None
expected a dictionary for dictionary value @ data['action'][0]['data_template']. Got None
extra keys not allowed @ data['action'][0]['value']. Got None. (See /config/configuration.yaml, line 204). Please check the docs at https://home-assistant.io/components/automation/
2018-01-19 14:20:50 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2018-01-19 14:20:50 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2018-01-19 14:20:51 WARNING (MainThread) [homeassistant.setup] Setup of remote is taking over 10 seconds.
2018-01-19 14:20:51 WARNING (MainThread) [homeassistant.setup] Setup of switch is taking over 10 seconds.
2018-01-19 14:20:51 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
2018-01-19 14:21:04 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.
2018-01-19 14:21:10 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.

Last automation:

 - alias: 'Set Input Number From Volume'
   initial_state: on
   trigger:
     - platform: state
       entity_id: sensor.google_home_volume_changed
       to: 'true'
       for:
         seconds: 2
     - platform: state
       entity_id: sensor.yamaha_volume_changed
       to: 'true'
       for:
         seconds: 2
     - platform: homeassistant
       event: start
   action:
     - service: input_number.set_value
       data_template:
       entity_id: >-
         {% set room = trigger.entity_id.split(".")[1] | replace("_changed", "") %}
         {% set entity = ["input_number",room]|join(".") %}
         {{entity}}
       value: >-
         {% set room = trigger.entity_id.split(".")[1] | replace("_volume_changed", "") %}
         {% if room == "goole_home" %}
           {{states.sensor.google_home_volume.state }}
         {% elif room == "yamaha" %}
           {{states.sensor.yamaha_volume.state }}
         {% endif %}

 - alias: 'Set Volume From Input Number'
   initial_state: on
   trigger:
     - platform: state
       entity_id: input_number.slider1
     - platform: state
       entity_id: input_number.slider2
   condition:
     condition: and
     conditions:
       - condition: template
         value_template: >-
           {% set room = trigger.entity_id.split(".")[1] %}
           {% set input_num = ["states.input_number",room,"state"]|join(".") %}
           {% set vol = ["states.sensor",room,"state"]|join(".") %}
           {% if input_num != vol %}true
           {%else%}false
           {% endif %}
   action:
     - service: media_player.volume_set
       data_template:
         entity_id: >-
           {% set room = trigger.entity_id.split(".")[1]|replace("_volume","")%}
           {% set entity = ["media_player",room]|join(".")%}
           {{entity}}
         volume_level: >-
           {% set room = trigger.entity_id.split(".")[1]|replace("_volume","")%}
           {% if room == "google_home" %}
             {{states.input_number.slider1.state | int / 100 | float}}
           {% elif room == "yamaha" %}
             {{states.input_number.slider2.state | int / 100 | float}}
           {% endif %}

I presume my problem is about entity_id:

Entity ID {% set room = trigger.entity_id.split(".")[1] | replace("_changed" is an invalid entity id for dictionary value @ data['action'][0]['entity_id']. Got Nonevalue @ data['action'][0]['entity_id']. Got None

But i don’t get it.

Thanks

@Romquenin

The problem is your input_number names don’t match. When I have some time later today I’ll write it out for you.

1 Like

Is the problem with input_number related to the “room” word. You are using it a lot in your automation. And it don’t use it in any of my config.

I don’t understand how it works in this case.

Thanks anyway Jer78

@Romquenin OK, here it is, try this out, but read my comments as you may need to make some modifications.

Sensors (the multiplications may be different for your setup. For Sonos it gives a float of e.g. 0.15 so I times it by 100 to get 15. So be careful when you use this to not max out your speakers. See what value in the media_player attributes.)

sensor:
  - platform: template
    sensors:  
      google_home_volume:
        value_template: >-
           {% set volume = states.media_player.google_home.attributes.volume_level %}
           {% set new_volume = volume * 100 %}
           {{ new_volume}}
      google_home_volume_changed:
        value_template: '{% if (states.input_number.google_home_volume.state | int) != (states.sensor.google_home_volume.state | int ) %}true{%else%}false{% endif %}'
      home_cinema_main_volume:
        value_template: >-
           {% set volume = states.media_player.home_cinema_main.attributes.volume_level %}
           {% set new_volume = volume * 100 %}
           {{ new_volume}}
      home_cinema_main_volume_changed:
        value_template: '{% if (states.input_number.home_cinema_main_volume.state | int) != (states.sensor.home_cinema_main_volume.state | int ) %}true{%else%}false{% endif %}'

Input Numbers (these have to be same names as your sensors for the automation to work)

input_number:
  google_home_volume:
    name: Google Home
    min: 0
    max: 60
    step: 1
  home_cinema_main_volume:
    name: Yamaha
    min: 0
    max: 60
    step: 1

Automations (again, the division is based off the values as mentioned above. Since it’s a different media_player you may want to test before setting volumes, I don’t want you to blow anything up!):

 - alias: 'Set Input Number From Volume'
   initial_state: on
   trigger:
     - platform: state
       entity_id: sensor.google_home_volume_changed
       to: 'true'
       for:
         seconds: 2
     - platform: state
       entity_id: sensor.home_cinema_main_volume_changed
       to: 'true'
       for:
         seconds: 2
     - platform: homeassistant
       event: start
   action:
     - service: input_number.set_value
       data_template:
       entity_id: >-
         {% set room = trigger.entity_id.split(".")[1] | replace("_changed", "") %}
         {% set entity = ["input_number",room]|join(".") %}
         {{entity}}
       value: >-
         {% set room = trigger.entity_id.split(".")[1] | replace("_volume_changed", "") %}
         {% if room == "google_home" %}
           {{states.sensor.google_home_volume.state }}
         {% elif room == "home_cinema_main" %}
           {{states.sensor.home_cinema_main_volume.state }}
         {% endif %}

 - alias: 'Set Volume From Input Number'
   initial_state: on
   trigger:
     - platform: state
       entity_id: input_number.google_home_volume
     - platform: state
       entity_id: input_number.home_cinema_main_volume
   condition:
     condition: and
     conditions:
       - condition: template
         value_template: >-
           {% set room = trigger.entity_id.split(".")[1] %}
           {% set input_num = ["states.input_number",room,"state"]|join(".") %}
           {% set vol = ["states.sensor",room,"state"]|join(".") %}
           {% if input_num != vol %}true
           {%else%}false
           {% endif %}
   action:
     - service: media_player.volume_set
       data_template:
         entity_id: >-
           {% set room = trigger.entity_id.split(".")[1]|replace("_volume","")%}
           {% set entity = ["media_player",room]|join(".")%}
           {{entity}}
         volume_level: >-
           {% set room = trigger.entity_id.split(".")[1]|replace("_volume","")%}
           {% if room == "google_home" %}
             {{states.input_number.google_home_volume.state | int / 100 | float}}
           {% elif room == "home_cinema_main" %}
             {{states.input_number.home_cinema_main_volume.state | int / 100 | float}}
           {% endif %}
1 Like

Well my friend thank you very much it works, for google home. The yamaha receiver don’t respond.

The google home respond perfectly, from mute to max and that’s pretty cool!

It will have been impossible without you and i want to thank you very much.

here is my log for the not solved yamaha error.

2018-01-19 18:07:50 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID {% set room = trigger.entity_id.split(".")[1] | replace("_changed" is an invalid entity id for dictionary value @ data['action'][0]['entity_id']. Got None
expected a dictionary for dictionary value @ data['action'][0]['data_template']. Got None
extra keys not allowed @ data['action'][0]['value']. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/
2018-01-19 18:07:57 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2018-01-19 18:08:00 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2018-01-19 18:08:00 WARNING (MainThread) [homeassistant.setup] Setup of switch is taking over 10 seconds.
2018-01-19 18:08:00 WARNING (MainThread) [homeassistant.setup] Setup of remote is taking over 10 seconds.
2018-01-19 18:08:00 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
2018-01-19 18:08:09 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.
2018-01-19 18:08:19 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2018-01-19 18:08:28 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/src/app/homeassistant/setup.py", line 60, in async_setup_component
    return (yield from task)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/src/app/homeassistant/setup.py", line 144, in _async_setup_component
    component = loader.get_component(domain)
  File "/usr/src/app/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/customizer/__init__.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax
2018-01-19 18:48:07 ERROR (MainThread) [homeassistant.components.sensor.template] Could not render template yamaha_volume: UndefinedError: 'mappingproxy object' has no attribute 'volume_level'
2018-01-19 18:48:23 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

I keep reading the code and it’s exactly the same for both devices. Why is the receiver not receiving command?

Thanks again, you are amazing.

1 Like

@Romquenin
Sorry, I missed something important. Your media_player has the name home_cinema_main not Yamaha, so we need to make all the sensors and input_numbers the same name. Don’t worry, your friendly name as shown on the frontend can still be Yamaha. I updated the post above to reflect those changes so now it should work as intended. Also, I took out the initial values in the input_number’s because it’s going to get the initial value of the actual value on start or change so you don’t need those, they will just mess with things.

Go ahead and try it now. I think I got everything this time around! Crossing my fingers. :sweat_smile:

1 Like

Jer78 you are the king of the Yaml!!!

It works!!!:joy::joy::joy:

Like you said i will have to manage the max volume output but man you are awsome, you solved my problem.

I will dig into into it and try understand the full process, but you rock it.

Thank you so much for your time and generosity

1 Like

Now that i have my sliders working fine i still receive errors in the log, i have a card with a problem with automation on startup and my startup takes longer:

2018-01-19 19:45:44 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID {% set room = trigger.entity_id.split(".")[1] | replace("_changed" is an invalid entity id for dictionary value @ data['action'][0]['entity_id']. Got None
expected a dictionary for dictionary value @ data['action'][0]['data_template']. Got None
extra keys not allowed @ data['action'][0]['value']. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/
2018-01-19 19:45:53 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2018-01-19 19:45:55 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2018-01-19 19:45:55 WARNING (MainThread) [homeassistant.setup] Setup of switch is taking over 10 seconds.
2018-01-19 19:45:55 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
2018-01-19 19:45:55 WARNING (MainThread) [homeassistant.setup] Setup of remote is taking over 10 seconds.
2018-01-19 19:46:09 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.
2018-01-19 19:46:13 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2018-01-19 19:46:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/src/app/homeassistant/setup.py", line 60, in async_setup_component
    return (yield from task)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/src/app/homeassistant/setup.py", line 144, in _async_setup_component
    component = loader.get_component(domain)
  File "/usr/src/app/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/customizer/__init__.py", line 7
    <!DOCTYPE html>
    ^

Do you have any idea?

Thanks again.

It seems that the error is related to this:

{% set room = trigger.entity_id.split(".")[1] | replace("_volume_changed"

“changed” is a unknown command

What do you think i should do? Replace it with something.

2018-01-19 19:20:37 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: Entity ID {% set room = trigger.entity_id.split(".")[1] | replace("_changed" is an invalid entity id for dictionary value @ data['action'][0]['entity_id']. Got None
expected a dictionary for dictionary value @ data['action'][0]['data_template']. Got None
extra keys not allowed @ data['action'][0]['value']. Got None. (See /config/configuration.yaml, line 241). Please check the docs at https://home-assistant.io/components/automation/

This is the same error on startup and i won’t go away until you verify that the ‘entity_id’ exists in the trigger.keys() list or remove the home assistant start trigger:

- alias: 'Set Input Number From Volume'
   initial_state: on
   trigger:
     - platform: state
       entity_id: sensor.google_home_volume_changed
       to: 'true'
       for:
         seconds: 2
     - platform: state
       entity_id: sensor.home_cinema_main_volume_changed
       to: 'true'
       for:
         seconds: 2
   action:
     - service: input_number.set_value
       data_template:
       entity_id: >-
         {% set room = trigger.entity_id.split(".")[1] | replace("_changed", "") %}
         {% set entity = ["input_number",room]|join(".") %}
         {{entity}}
       value: >-
         {% set room = trigger.entity_id.split(".")[1] | replace("_volume_changed", "") %}
         {% if room == "google_home" %}
           {{states.sensor.google_home_volume.state }}
         {% elif room == "home_cinema_main" %}
           {{states.sensor.home_cinema_main_volume.state }}
         {% endif %}

 - alias: 'Set Volume From Input Number'
   initial_state: on
   trigger:
     - platform: state
       entity_id: input_number.google_home_volume
     - platform: state
       entity_id: input_number.home_cinema_main_volume
   condition:
     condition: and
     conditions:
       - condition: template
         value_template: >-
           {% set room = trigger.entity_id.split(".")[1] %}
           {% set input_num = ["states.input_number",room,"state"]|join(".") %}
           {% set vol = ["states.sensor",room,"state"]|join(".") %}
           {% if input_num != vol %}true
           {%else%}false
           {% endif %}
   action:
     - service: media_player.volume_set
       data_template:
         entity_id: >-
           {% set room = trigger.entity_id.split(".")[1]|replace("_volume","")%}
           {% set entity = ["media_player",room]|join(".")%}
           {{entity}}
         volume_level: >-
           {% set room = trigger.entity_id.split(".")[1]|replace("_volume","")%}
           {% if room == "google_home" %}
             {{states.input_number.google_home_volume.state | int / 100 | float}}
           {% elif room == "home_cinema_main" %}
             {{states.input_number.home_cinema_main_volume.state | int / 100 | float}}
           {% endif %}

I pasted your code without the home assistant start trigger and having the same error.

I’m triyng to understand.

I can verify entity_id from dev tools states, how can check the trigger keys list?

Thanks.

I’m not sure then, I’ll try to implement your code with my yamaha reciever when I get home.

Thanks petro.

@Romquenin
Hmm…I’ll check and see if I also get the same error tonight in my logs. But at least it’s working for now. I think that error might just be on start-up if it hasn’t yet loaded the media_player component so it’s taking a bit longer waiting for it to load. But let me do some digging. How much longer does start up take? Is it really noticeable? Try disabling the automations temporarily and see if that impacts it.

The boot time is more due to the custom UI i just installed.

I’m waiting for your update.

Thank you Jer78

Ok, I made this alittle less convoluted. You should only need 2 sliders and 4 automations. You won’t need any sensors.

These are your sliders:

  google_home:
    name: Goggle Home Volume
    initial: 40
    min: 0
    max: 100
    step: 1
    
  home_cinema_main:
    name: Cinema Volume
    initial: 40
    min: 0
    max: 100
    step: 1

These are you automations:

- alias: Set Goggle Home Slider Position
  trigger:
    - platform: state
      entity_id: media_player.google_home
  condition:
    - condition: template
      value_template: "{{ not is_state_attr('media_player.google_home', 'volume_level', states('input_number.google_home') | int / 100) }}"
  action:
    - service: input_number.set_value
      entity_id: input_number.google_home
      data_template:
        value: "{{ trigger.to_state.attributes.volume_level | multiply(100) | int }}"

- alias: Set Goggle Home Volume
  trigger:
    - platform: state
      entity_id: input_number.google_home
  condition:
    - condition: template
      value_template: "{{ not is_state_attr('media_player.google_home', 'volume_level', states('input_number.google_home') | int / 100) }}"
  action:
    - service: media_player.volume_set
      entity_id: media_player.google_home
      data_template:
        volume_level: "{{ states('input_number.google_home') | int / 100 }}"

- alias: Set Home Cinema Main Slider Position
  trigger:
    - platform: state
      entity_id: media_player.home_cinema_main
  condition:
    - condition: template
      value_template: "{{ not is_state_attr('media_player.home_cinema_main', 'volume_level', states('input_number.home_cinema_main') | int / 100) }}"
  action:
    - service: input_number.set_value
      entity_id: input_number.home_cinema_main
      data_template:
        value: "{{ trigger.to_state.attributes.volume_level | multiply(100) | int }}"

- alias: Set Home Cinema Main Volume
  trigger:
    - platform: state
      entity_id: input_number.home_cinema_main
  condition:
    - condition: template
      value_template: "{{ not is_state_attr('media_player.home_cinema_main', 'volume_level', states('input_number.home_cinema_main') | int / 100) }}"
  action:
    - service: media_player.volume_set
      entity_id: media_player.home_cinema_main
      data_template:
        volume_level: "{{ states('input_number.home_cinema_main') | int / 100 }}"

This should be easier to read and has less listeners. You can keep your sensors if you want, but they aren’t needed at this point.

Also, your sliders should react immediately instead of having a 2 second delay.

1 Like

check my last message, I accidentally replied to myself.

hello, i just pasted your code and it breaks the sliders, i still have some errors also

I willl revert back to the previous config.

Thanks anyway.

2018-01-20 00:33:42 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 seconds.
2018-01-20 00:33:43 WARNING (MainThread) [homeassistant.setup] Setup of media_player is taking over 10 seconds.
2018-01-20 00:33:43 WARNING (MainThread) [homeassistant.setup] Setup of remote is taking over 10 seconds.
2018-01-20 00:33:43 WARNING (MainThread) [homeassistant.setup] Setup of device_tracker is taking over 10 seconds.
2018-01-20 00:33:43 WARNING (MainThread) [homeassistant.setup] Setup of switch is taking over 10 seconds.
2018-01-20 00:33:47 WARNING (MainThread) [homeassistant.setup] Setup of tts is taking over 10 seconds.
2018-01-20 00:34:02 WARNING (MainThread) [homeassistant.components.media_player] Setup of platform cast is taking over 10 seconds.
2018-01-20 00:34:11 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/src/app/homeassistant/setup.py", line 60, in async_setup_component
    return (yield from task)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 327, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/src/app/homeassistant/setup.py", line 144, in _async_setup_component
    component = loader.get_component(domain)
  File "/usr/src/app/homeassistant/loader.py", line 142, in get_component
    module = importlib.import_module(path)
  File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/customizer/__init__.py", line 7
    <!DOCTYPE html>
    ^
SyntaxError: invalid syntax

did you rename your sliders? The sliders in the pasted code go with the sliders I created in my last post. They do not work with your sliders with _volume at the end