1
mirror of https://github.com/home-assistant/core synced 2024-08-15 18:25:44 +02:00

Use Owntone name for forked-daapd (#79214)

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
uvjustin 2022-09-28 19:46:27 -07:00 committed by GitHub
parent 504ce8e93a
commit 79713d637a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 16 deletions

View File

@ -30,7 +30,7 @@ DEFAULT_TTS_PAUSE_TIME = 1.2
DEFAULT_TTS_VOLUME = 0.8
DEFAULT_UNMUTE_VOLUME = 0.6
DOMAIN = "forked_daapd" # key for hass.data
FD_NAME = "forked-daapd"
FD_NAME = "Owntone"
HASS_DATA_REMOVE_LISTENERS_KEY = "REMOVE_LISTENERS"
HASS_DATA_UPDATER_KEY = "UPDATER"
KNOWN_PIPES = {"librespot-java"}

View File

@ -1,6 +1,6 @@
{
"domain": "forked_daapd",
"name": "forked-daapd",
"name": "Owntone",
"documentation": "https://www.home-assistant.io/integrations/forked_daapd",
"codeowners": ["@uvjustin"],
"requirements": ["pyforked-daapd==0.1.11", "pylibrespot-java==0.1.0"],

View File

@ -3,7 +3,7 @@
"flow_title": "{name} ({host})",
"step": {
"user": {
"title": "Set up forked-daapd device",
"title": "Set up Owntone device",
"data": {
"name": "Friendly name",
"host": "[%key:common::config_flow::data::host%]",
@ -13,23 +13,23 @@
}
},
"error": {
"forbidden": "Unable to connect. Please check your forked-daapd network permissions.",
"websocket_not_enabled": "forked-daapd server websocket not enabled.",
"forbidden": "Unable to connect. Please check your Owntone network permissions.",
"websocket_not_enabled": "Owntone server websocket not enabled.",
"wrong_host_or_port": "Unable to connect. Please check host and port.",
"wrong_password": "Incorrect password.",
"wrong_server_type": "The forked-daapd integration requires a forked-daapd server with version >= 27.0.",
"wrong_server_type": "The Owntone integration requires an Owntone server with version >= 27.0.",
"unknown_error": "[%key:common::config_flow::error::unknown%]"
},
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"not_forked_daapd": "Device is not a forked-daapd server."
"not_forked_daapd": "Device is not an Owntone server."
}
},
"options": {
"step": {
"init": {
"title": "Configure forked-daapd options",
"description": "Set various options for the forked-daapd integration.",
"title": "Configure Owntone options",
"description": "Set various options for the Owntone integration.",
"data": {
"librespot_java_port": "Port for librespot-java pipe control (if used)",
"max_playlists": "Max number of playlists used as sources",

View File

@ -1411,7 +1411,7 @@
"forked_daapd": {
"config_flow": true,
"iot_class": "local_push",
"name": "forked-daapd"
"name": "Owntone"
},
"fortios": {
"config_flow": false,

View File

@ -12,7 +12,7 @@ from homeassistant.components.spotify.const import (
from homeassistant.components.websocket_api.const import TYPE_RESULT
from homeassistant.setup import async_setup_component
TEST_MASTER_ENTITY_NAME = "media_player.forked_daapd_server"
TEST_MASTER_ENTITY_NAME = "media_player.owntone_server"
async def test_async_browse_media(hass, hass_ws_client, config_entry):

View File

@ -66,10 +66,9 @@ from homeassistant.const import (
from tests.common import async_mock_signal
TEST_MASTER_ENTITY_NAME = "media_player.forked_daapd_server"
TEST_MASTER_ENTITY_NAME = "media_player.owntone_server"
TEST_ZONE_ENTITY_NAMES = [
"media_player.forked_daapd_output_" + x
for x in ("kitchen", "computer", "daapd_fifo")
"media_player.owntone_output_" + x for x in ("kitchen", "computer", "daapd_fifo")
]
OPTIONS_DATA = {
@ -354,7 +353,7 @@ def test_master_state(hass, mock_api_object):
"""Test master state attributes."""
state = hass.states.get(TEST_MASTER_ENTITY_NAME)
assert state.state == STATE_PAUSED
assert state.attributes[ATTR_FRIENDLY_NAME] == "forked-daapd server"
assert state.attributes[ATTR_FRIENDLY_NAME] == "Owntone server"
assert state.attributes[ATTR_SUPPORTED_FEATURES] == SUPPORTED_FEATURES
assert not state.attributes[ATTR_MEDIA_VOLUME_MUTED]
assert state.attributes[ATTR_MEDIA_VOLUME_LEVEL] == 0.2
@ -413,7 +412,7 @@ async def test_zone(hass, mock_api_object):
"""Test zone attributes and methods."""
zone_entity_name = TEST_ZONE_ENTITY_NAMES[0]
state = hass.states.get(zone_entity_name)
assert state.attributes[ATTR_FRIENDLY_NAME] == "forked-daapd output (kitchen)"
assert state.attributes[ATTR_FRIENDLY_NAME] == "Owntone output (kitchen)"
assert state.attributes[ATTR_SUPPORTED_FEATURES] == SUPPORTED_FEATURES_ZONE
assert state.state == STATE_ON
assert state.attributes[ATTR_MEDIA_VOLUME_LEVEL] == 0.5