Compare commits
No commits in common. "2cc74193e78cff3b0ae0b295fbd56b8d9d5a4357" and "99ca6d9d0dde22cf2b8e243a0ac7c167f2a58687" have entirely different histories.
2cc74193e7
...
99ca6d9d0d
@ -67,10 +67,3 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload a config entry."""
|
||||
return await hass.config_entries.async_forward_entry_unload(
|
||||
entry, "switch"
|
||||
)
|
||||
|
@ -2,6 +2,7 @@ import logging
|
||||
import re
|
||||
|
||||
import fabric2
|
||||
import yaml
|
||||
from fabric2 import Connection
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
@ -212,7 +213,10 @@ def change_monitors_config(connection: Connection, monitors_config: dict):
|
||||
if is_unix_system(connection):
|
||||
command_parts = ["gnome-monitor-config", "set"]
|
||||
|
||||
for monitor, settings in monitors_config.items():
|
||||
# Convert str to dict (yaml)
|
||||
monitors_config = yaml.safe_load(monitors_config)
|
||||
|
||||
for monitor, settings in monitors_config.get('monitors', {}).items():
|
||||
if settings.get('enabled', False):
|
||||
if 'primary' in settings and settings['primary']:
|
||||
command_parts.append(f'-LpM {monitor}')
|
||||
|
Loading…
Reference in New Issue
Block a user