Compare commits
	
		
			1 Commits
		
	
	
		
			main
			...
			fix/soundb
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 2c278da442 | 
|  | @ -1,5 +1,12 @@ | |||
| # Changelog | ||||
| 
 | ||||
| ## [0.3.1] Let HomeAssistant schedule failing setup of integration | ||||
| 
 | ||||
| ### Added | ||||
| 
 | ||||
| - Add a `try / catch` mechanism to the first update of the client while setup and throw a | ||||
|   `ConfigEntryNotReady` exception when the update fails | ||||
| 
 | ||||
| ## [0.3.0] Icons and Chore | ||||
| 
 | ||||
| ### Added | ||||
|  |  | |||
|  | @ -1,7 +1,9 @@ | |||
| import logging | ||||
| 
 | ||||
| from aiohttp import ClientResponseError | ||||
| from homeassistant.config_entries import ConfigEntry | ||||
| from homeassistant.core import DOMAIN, HomeAssistant | ||||
| from homeassistant.exceptions import ConfigEntryNotReady | ||||
| from homeassistant.helpers.aiohttp_client import async_get_clientsession | ||||
| from pysmartthings import SmartThings | ||||
| 
 | ||||
|  | @ -49,7 +51,12 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | |||
|             entry.data.get(CONF_ENTRY_MAX_VOLUME), | ||||
|             entry.data.get(CONF_ENTRY_DEVICE_NAME), | ||||
|         ) | ||||
|         try: | ||||
|             await soundbar_device.update() | ||||
|         except ClientResponseError as excp: | ||||
|             raise ConfigEntryNotReady("An error occurred while setting up the soundbar device. " | ||||
|                                       "Please recheck whether the device has power or is connected to the internet.")\ | ||||
|                 from excp | ||||
|         domain_config.devices[entry.data.get(CONF_ENTRY_DEVICE_ID)] = DeviceConfig( | ||||
|             entry.data, soundbar_device | ||||
|         ) | ||||
|  |  | |||
|  | @ -8,5 +8,5 @@ | |||
|   "iot_class": "cloud_polling", | ||||
|   "issue_tracker": "https://github.com/samuelspagl/ha_samsung_soundbar/issues", | ||||
|   "requirements": ["pysmartthings"], | ||||
|   "version": "0.3.0" | ||||
|   "version": "0.3.1" | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue