Comments (5)
Check out https://www.home-assistant.io/integrations/kef/
from media_player.kef.
from media_player.kef.
I found the following solution:
- Install
aiokef
directly into OS where HomeAssistant is running, because some dependencies are missing:
> pip3 install aiokef
- update
media_player.py
from this repo.
Replace
from custom_components.kef_custom.aiokef import (
AsyncKefSpeaker,
DSP_OPTION_MAPPING,
)
with
from aiokef import AsyncKefSpeaker
def arange(start, end, step):
return [x * step for x in range(int(start / step), int(end / step) + 1)]
# DSP options
_DESK_WALL_DB_OPTIONS = arange(-6, 0, 0.5)
_TREBLE_DB_OPTIONS = arange(-2, 2, 0.5)
_HIGH_HZ_OPTIONS = arange(50, 120, 5)
_LOW_HZ_OPTIONS = arange(40, 250, 5)
_SUB_DB_OPTIONS = arange(-10, 10, 1)
DSP_OPTION_MAPPING = {
"desk_db": _DESK_WALL_DB_OPTIONS,
"wall_db": _DESK_WALL_DB_OPTIONS,
"treble_db": _TREBLE_DB_OPTIONS,
"high_hz": _HIGH_HZ_OPTIONS,
"low_hz": _LOW_HZ_OPTIONS,
"sub_db": _SUB_DB_OPTIONS,
}
And also, replace MediaPlayerDevice
with MediaPlayerEntity
, to avoid HASS warning of deprecation.
And also, replace ioloop
into loop
all over the file
media_player = KefMediaPlayer(
name,
host,
port,
maximum_volume,
volume_step,
standby_time,
inverse_speaker_mode,
supports_on,
sources,
loop=hass.loop,
unique_id=unique_id,
)
That made it start with HASS, and I am able to control my KEF LSX. I guess I might just do a fork of this repo.
from media_player.kef.
@basnijholt oh, what the hell! I was searching for one and couldn't find anything... Truly blind I was! I guess it's not in the Integrations catalog yet.
from media_player.kef.
@basnijholt maybe, if that makes sense, it would be reasonable to have some top-level comment in this repo README.md. That this is a deprecated repo and we should just use the official HASS component. Thanks for pointing it out!
from media_player.kef.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media_player.kef.