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
not sure, they should work the same. Check for typos in the code i pasted. For your information, the code I posted is not bullet proof. Home assistant will error if you move the slider when the media_player is off.
I have a couple of problems.
I am using the Yamaha TSR7850. When I just implement your code from:
I get the following error: Error during template condition: UndefinedError: 'mappingproxy object' has no attribute 'volume_level'
Also, my receiver has the following states: off, idle & playing, so your code didn’t function as intended out of the box. The state buttons didn’t show when the receiver was on. I have tried to change the code to the following:
- platform: template
switches:
#
- platform: template
switches:
# ZONE 1 MEDIA SWITCH
zone_1:
value_template: "{{ not is_state('media_player.yamaha_receiver', 'off') }}"
turn_on:
service: media_player.turn_on
entity_id: media_player.yamaha_receiver
turn_off:
service: media_player.turn_off
entity_id: media_player.yamaha_receiver
# ZONE 2 MEDIA SWITCH
zone_2:
value_template: "{{ not is_state('media_player.yamaha_receiver_zone_2', 'off') }}"
turn_on:
service: media_player.turn_on
entity_id: media_player.yamaha_receiver_zone_2
turn_off:
service: media_player.turn_off
entity_id: media_player.yamaha_receiver_zone_2
That made the state switches work, but nothing happens when I move the volume sliders.It moves but doesn’t change the volume.
Any ideas?
Here is the rest of my code:
input_number:
yamaha_receiver:
name: Zone 1 Volume
initial: -80
min: -80
max: 0
step: 5
unit_of_measurement: dB
yamaha_receiver_zone_2:
name: Zone 2 Volume
initial: -80
min: -80
max: 0
step: 5
unit_of_measurement: dB
for this error add a condition in the volume automations that verifies that the state isn’t off.
I just threw those equations together for that post. I actually don’t use it, I use appdeamon. Someone else came accross my post recently and I had found errors in the equations.
These are the updated equations and they should work. You may need to remove the condition.
I had this working perfectly but since updating my hassio to the latest version it doesn’t work anymore. Any idea what I have to change? I had it working perfectly from the initial instructions.