oncleben31 / cookiecutter-homeassistant-custom-component Goto Github PK
View Code? Open in Web Editor NEWCookiecutter template for Home Assistant custom component
License: MIT License
Cookiecutter template for Home Assistant custom component
License: MIT License
To solve:
Warning: G] [TRANSLATIONS] Invalid sensor.en.json: Device class need to start with 'cookiecutter_homeassistant_custom_component_instance__'. Key _ is invalid. See https://developers.home-assistant.io/docs/internationalization/core#stringssensorjson for dictionary value @ data['state']. Got {'_': {'some_sample_static_text': 'Some sample static text.'}}
Currently the template assume the generated repository is hosted on an individual GitHub account.
If not manual modifications are needed.
Currently still using Ludeeus user name and not the one set by cookiecutter for this badge
This is the key value of the template. Allowing to work with in containers to debug and test the custom component in a dedicated instance of Home Assistant core.
Element of documentation to be reused: https://developers.home-assistant.io/docs/development_environment#developing-with-visual-studio-code--devcontainer
To give values and help developers to find easily documentation.
The generated file is not compliant with prettier check in CI.
Check how it is done here: https://github.com/cjolowicz/cookiecutter-hypermodern-python/blob/master/hooks/post_gen_project.py
Align on Home Assistant Python version:
Test, lint, devcontainer and documentation should be align on that.
Documentation currently in blueprint readme could be move in the documentation.
Warning: Use hacs/integration/action@main instead of hacs/integration/action@master
For generated project and for cookiecutter template
locally and in CI
Some of them are still using Blueprint
2020.11.16 is synchronized with blueprint commit from Oct 2, 2020
Add a way in the documentation to show with which version the cookiecutter is synchronized.
https://github.com/custom-components/blueprint
Check latest modification and create PR with improvements implemented in the cookiecutter template.
Add French translation for config flow and sensor strings
https://github.com/prettier/pre-commit is archived and redirect to https://github.com/pre-commit/mirrors-prettier
Add a GitHub workflow for this project to ensure every contribution have used the pre-commit rules.
Currently it run black and update the code in the workflow environment.
There is no commit nor error raised.
Should raise an error or correct the code
locally and in CI in GithubAction
Each time we push to the cookiecutter repository, reset the instance repository with the generated folder.
pre-commit
flake8
black
reorder-python-imports
When bumping this cookie cutter template, the documentation need to be updated in 3 places to be consistent. It haul be possible to reduce the number of occurrences
add logo
reference in HACS default
debug with integration https://www.home-assistant.io/integrations/ptvsd/
Integration name
Integration domain name
GitHub repository name
user
email
initial version.
It's easy to debug when developping in containers.
Add doc and code even commented to make if visible
check how it's done in https://github.com/boralyl/cookiecutter-homeassistant-component
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.