Skip to content

Commit

Permalink
Merge pull request #2 from lnx85/devel
Browse files Browse the repository at this point in the history
1.1.2
  • Loading branch information
lnx85 authored May 4, 2024
2 parents b55ff12 + f78a449 commit ee5d259
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.idea/
/.vscode/
/.env/
__pycache__/
.pytest_cache/
Expand Down
59 changes: 59 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [{
"name": "Home Assistant",
"type": "python",
"request": "launch",
"module": "homeassistant",
"justMyCode": false,
"args": ["--debug"],
"preLaunchTask": "Compile English translations"
},
{
"name": "Home Assistant (skip pip)",
"type": "python",
"request": "launch",
"module": "homeassistant",
"justMyCode": false,
"args": ["--debug", "--skip-pip"],
"preLaunchTask": "Compile English translations"
},
{
"name": "Home Assistant: Changed tests",
"type": "python",
"request": "launch",
"module": "pytest",
"justMyCode": false,
"args": ["--timeout=10", "--picked"],
},
{
// Debug by attaching to local Home Assistant server using Remote Python Debugger.
// See https://www.home-assistant.io/integrations/debugpy/
"name": "Home Assistant: Attach Local",
"type": "python",
"request": "attach",
"port": 5678,
"host": "localhost",
"pathMappings": [{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}]
},
{
// Debug by attaching to remote Home Assistant server using Remote Python Debugger.
// See https://www.home-assistant.io/integrations/debugpy/
"name": "Home Assistant: Attach Remote",
"type": "python",
"request": "attach",
"port": 5678,
"host": "homeassistant.local",
"pathMappings": [{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/usr/src/homeassistant"
}]
}
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"black-formatter.importStrategy": "fromEnvironment",
"python.testing.pytestEnabled": true,
"pylint.importStrategy": "fromEnvironment",
"python.linting.lintOnSave": true,
}
35 changes: 35 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Install requirements",
"type": "shell",
"command": "pip3 install -r requirements-dev.txt",
"problemMatcher": []
},
{
"label": "Run Home Assistant on port 8123",
"type": "shell",
"command": "python -m homeassistant",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "pip install -U home-assistant",
"problemMatcher": []
},
{
"label": "Unit tests",
"type": "shell",
"command": "pytest --cov=. --cov-config=.coveragerc --cov-report xml:coverage.xml",
"problemMatcher": []
},
{
"label": "Reformat code",
"type": "shell",
"command": "isort . && black .",
"problemMatcher": []
}
]
}
2 changes: 1 addition & 1 deletion custom_components/delios/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
DEFAULT_USERNAME = "user"
DEFAULT_SCAN_INTERVAL = 10

SYSTEM_UPDATE_INTERVAL = 60 * 60 * 24
SYSTEM_UPDATE_INTERVAL = 60 * 60

0 comments on commit ee5d259

Please sign in to comment.