Skip to content

Commit

Permalink
move AC mode config under the right configuration step (#108)
Browse files Browse the repository at this point in the history
* move AC mode config under the right configuration step
  • Loading branch information
muchasuerte authored Oct 21, 2023
1 parent 043fd5f commit eb54f28
Show file tree
Hide file tree
Showing 10 changed files with 208 additions and 101 deletions.
1 change: 0 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"ms-python.vscode-pylance"
],
"mounts": [
"source=/Users/jmcollin/SugarSync/Projets/home-assistant/core,target=/home/vscode/core,type=bind,consistency=cached",
"source=${localWorkspaceFolder}/.devcontainer/configuration.yaml,target=/home/vscode/core/config/configuration.yaml,type=bind,consistency=cached",
"source=${localWorkspaceFolder}/custom_components,target=/home/vscode/core/config/custom_components,type=bind,consistency=cached"
],
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,6 @@ dist
# TernJS port file
.tern-port

# init file required for unittest
custom_components/__init__.py
__pycache__
72 changes: 42 additions & 30 deletions container
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,45 @@

cd $HA

echo "arguments are: "$*
# Post installation of container
command=$1
if [ "$command" == "install" ]; then
echo "Running container post installation"
script/setup
fi

if [ "$command" == "start" ]; then
echo "Running container start"
hass -c ./config --debug
fi

if [ "$command" == "translations" ]; then
echo "Running container start"
python3 -m script.translations develop
fi

if [ "$command" == "hassfest" ]; then
echo "Running container start"
python3 -m script.hassfest
# python -m script.hassfest --requirements --action validate --integration-path config/custom_components/versatile_thermostat/
fi

if [ "$command" == "restart" ]; then
echo "Killing existing container"
pkill hass
echo "Killing existing container"
hass -c ./config
fi
function get_dev() {
cd /workspaces/versatile_thermostat/custom_components/versatile_thermostat/
pip install pytest
pip install -r requirements_dev.txt
pip install -r requirements_test.txt
sudo chown -R vscode: /home/vscode/core
cd -
}

echo "arguments are: "$1

case $1 in
start)
echo "Running container start"
cd $HA
hass -c ./config --debug
;;
dev-setup)
get_dev
;;
install)
echo "Running container post installation"
script/setup
;;
translations)
echo "Running container start"
cd $HA
python3 -m script.translations develop
;;
hassfest)
echo "Running container start"
python3 -m script.hassfest
# python -m script.hassfest --requirements --action validate --integration-path config/custom_components/versatile_thermostat/
;;
restart)
echo "Killing existing container"
pkill hass
echo "Killing existing container"
cd $HA
hass -c ./config
;;
esac
Loading

0 comments on commit eb54f28

Please sign in to comment.