diff --git a/README.md b/README.md index be30a43..cb91049 100644 --- a/README.md +++ b/README.md @@ -82,5 +82,4 @@ If you want to contribute to this please read the [Contribution guidelines](CONT [hacsbadge]: https://img.shields.io/badge/HACS-Custom-orange.svg?style=for-the-badge [releases-shield]: https://img.shields.io/github/release/wrodie/ha_behringer_mixer.svg?style=for-the-badge [releases]: https://github.com/wrodie/ha_behringer_mixer/releases -[integration_blueprint]: https://github.com/ludeeus/integration_blueprint -[license-shield]: https://img.shields.io/github/license/ludeeus/integration_blueprint.svg?style=for-the-badge +[license-shield]: https://img.shields.io/github/license/wrodie/ha_behringer_mixer.svg?style=for-the-badge diff --git a/config/configuration.yaml b/config/configuration.yaml index a3d2af9..6d4b019 100644 --- a/config/configuration.yaml +++ b/config/configuration.yaml @@ -1,8 +1,16 @@ -# https://www.home-assistant.io/integrations/default_config/ + +# Loads default set of integrations. Do not remove. default_config: -# https://www.home-assistant.io/integrations/logger/ logger: default: info logs: custom_components.ha_behringer_mixer: debug + +# Load frontend themes from the themes folder +frontend: + themes: !include_dir_merge_named themes + +automation: !include automations.yaml +script: !include scripts.yaml +scene: !include scenes.yaml diff --git a/custom_components/ha_behringer_mixer/api.py b/custom_components/ha_behringer_mixer/api.py index 5d67334..d745d6e 100644 --- a/custom_components/ha_behringer_mixer/api.py +++ b/custom_components/ha_behringer_mixer/api.py @@ -80,7 +80,7 @@ async def load_scene(self, scene_number): def new_data_callback(self, data: dict): """Handle the callback indicating new data has been received.""" - if data.get("property").endswith("_db"): + if data and data.get("property") and data.get("property").endswith("_db"): return True if self.coordinator: self.coordinator.async_set_updated_data(self._get_data()) diff --git a/custom_components/ha_behringer_mixer/const.py b/custom_components/ha_behringer_mixer/const.py index d9571e8..44e1222 100644 --- a/custom_components/ha_behringer_mixer/const.py +++ b/custom_components/ha_behringer_mixer/const.py @@ -6,4 +6,4 @@ NAME = "Behringer Mixer" DOMAIN = "ha_behringer_mixer" VERSION = "0.1.1" -ATTRIBUTION = "Data provided by http://jsonplaceholder.typicode.com/" +ATTRIBUTION = "" diff --git a/custom_components/ha_behringer_mixer/manifest.json b/custom_components/ha_behringer_mixer/manifest.json index c44dc15..4096454 100644 --- a/custom_components/ha_behringer_mixer/manifest.json +++ b/custom_components/ha_behringer_mixer/manifest.json @@ -8,7 +8,7 @@ "iot_class": "local_push", "issue_tracker": "https://github.com/wrodie/ha_behringer_mixer/issues", "requirements": [ - "behringer-mixer==0.4.3" + "behringer-mixer==0.4.4" ], - "version": "0.1.7" + "version": "0.1.8" } diff --git a/custom_components/ha_behringer_mixer/select.py b/custom_components/ha_behringer_mixer/select.py index 0ed7ab4..2a3c38b 100644 --- a/custom_components/ha_behringer_mixer/select.py +++ b/custom_components/ha_behringer_mixer/select.py @@ -53,4 +53,6 @@ async def async_select_option(self, option: str) -> None: @property def current_option(self) -> str | None: """Return the current option.""" - return self.coordinator.data[self.base_address] + if self.base_address in self.coordinator.data: + return self.coordinator.data[self.base_address] + return None diff --git a/custom_components/ha_behringer_mixer/translations/en.json b/custom_components/ha_behringer_mixer/translations/en.json index 2bbc231..fed2fb3 100644 --- a/custom_components/ha_behringer_mixer/translations/en.json +++ b/custom_components/ha_behringer_mixer/translations/en.json @@ -17,9 +17,9 @@ "MATRICES": "Matrices to import", "AUXINS": "Aux ins to import", "DCAS": "DCAs to import", - "MAIN": "Do you want to import the Main/LR Fader?", - "CHANNELSENDS": "Do you want to import Channel->Bus Sends?", - "BUSSENDS": "Do you want to import Bus->Matrix Sends?" + "MAIN": "Import the Main/LR Fader?", + "CHANNELSENDS": "Import Channel->Bus Sends?", + "BUSSENDS": "Import Bus->Matrix Sends?" } } },