Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.ps4 Namespace Reference

Namespaces

 config_flow
 
 const
 
 media_player
 

Classes

class  PS4Data
 

Functions

dict _reformat_data (HomeAssistant hass, dict games, str unique_id)
 
bool async_migrate_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 
def format_unique_id (creds, mac_address)
 
JsonObjectType load_games (HomeAssistant hass, str unique_id)
 
def save_games (HomeAssistant hass, dict games, str unique_id)
 
def service_handle (HomeAssistant hass)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)
 
list PLATFORMS = [Platform.MEDIA_PLAYER]
 
 PS4_COMMAND_SCHEMA
 
string SERVICE_COMMAND = "send_command"
 

Detailed Description

Support for PlayStation 4 consoles.

Function Documentation

◆ _reformat_data()

dict homeassistant.components.ps4._reformat_data ( HomeAssistant  hass,
dict  games,
str  unique_id 
)
private
Reformat data to correct format.

Definition at line 196 of file __init__.py.

◆ async_migrate_entry()

bool homeassistant.components.ps4.async_migrate_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Migrate old entry.

Definition at line 91 of file __init__.py.

◆ async_setup()

bool homeassistant.components.ps4.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the PS4 Component.

Definition at line 69 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.ps4.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up PS4 from a config entry.

Definition at line 80 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.ps4.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a PS4 config entry.

Definition at line 86 of file __init__.py.

◆ format_unique_id()

def homeassistant.components.ps4.format_unique_id (   creds,
  mac_address 
)
Use last 4 Chars of credential as suffix. Unique ID per PSN user.

Definition at line 166 of file __init__.py.

◆ load_games()

JsonObjectType homeassistant.components.ps4.load_games ( HomeAssistant  hass,
str  unique_id 
)
Load games for sources.

Definition at line 172 of file __init__.py.

◆ save_games()

def homeassistant.components.ps4.save_games ( HomeAssistant  hass,
dict  games,
str  unique_id 
)
Save games to file.

Definition at line 187 of file __init__.py.

◆ service_handle()

def homeassistant.components.ps4.service_handle ( HomeAssistant  hass)
Handle for services.

Definition at line 219 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.ps4._LOGGER = logging.getLogger(__name__)
private

Definition at line 44 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.ps4.CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)

Definition at line 57 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.ps4.PLATFORMS = [Platform.MEDIA_PLAYER]

Definition at line 55 of file __init__.py.

◆ PS4_COMMAND_SCHEMA

homeassistant.components.ps4.PS4_COMMAND_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(ATTR_ENTITY_ID): cv.entity_ids,
4  vol.Required(ATTR_COMMAND): vol.In(list(COMMANDS)),
5  }
6 )

Definition at line 48 of file __init__.py.

◆ SERVICE_COMMAND

string homeassistant.components.ps4.SERVICE_COMMAND = "send_command"

Definition at line 46 of file __init__.py.