New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New sensor component : ds248x #6616
base: dev
Are you sure you want to change the base?
Conversation
Hey there @alainstark, CODEOWNERS = ["@alainstark"] And run (message by NeedsCodeownersLabel) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #6616 +/- ##
==========================================
+ Coverage 53.70% 54.24% +0.53%
==========================================
Files 50 50
Lines 9408 9581 +173
Branches 1654 1688 +34
==========================================
+ Hits 5053 5197 +144
- Misses 4056 4060 +4
- Partials 299 324 +25 ☔ View full report in Codecov by Sentry. |
Please edit the top message by specifying the PR number for the docs. |
You can also link the feature request to the "Related issue or feature (if applicable): fixes" sentece in the opening message. |
import CONF_CHANNEL from const.py
CONF_DS248X_TYPE not match value
Import CONF_TYPE from const.py
Suppress local CONF_TYPE const
Macros not allowed
clang format
clang tidy
Hello, |
add CODEOWNERS
remove CODEOWNERS
Add CODEOWNERS
What board did you use for testing? |
I use an Olimex esp32 PoE ISO. |
@alainstark Which ds248x board do you use as an i²C <==> to 1-wire bus adapter? |
I searched for the chip but i only find the chip itself, not a board. I am interested in testing because of the following: Internal factory trimmed timers relieve the system host processor from generating time-critical 1-Wire waveforms, supporting both standard and Overdrive 1-Wire communication speeds. I have a ESP32-S3 with a lot of sensors and also a modbus connectection and when I add the ds18b20 I get some strange problems. When I use the ds18b20 without the other sensors and modbus connection it works good. |
This component is working with many I²C to 1-wire : ds2482-100, ds2482-800 |
Where did you order the ds2482-100 or ds2482-800? |
I use this breakout board with this I²C level shifter. |
I noticed other chips in Analog Devices website:
Do you know what the main difference is between the DS2482 and these other references? |
CODEOWNERS = ["@alainstark"] | ||
|
||
MULTI_CONF = True | ||
AUTO_LOAD = ["sensor"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move all of the sensor code into a sensor
directory so that the parent component does not rely on the sensor headers.
AUTO_LOAD = ["sensor"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I have make the change but I am a poor git user.
$ git status
On branch dev
Your branch is up to date with 'origin/dev'.
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: CODEOWNERS
modified: esphome/components/ds248x/__init__.py
modified: esphome/components/ds248x/ds248x.cpp
modified: esphome/components/ds248x/ds248x.h
renamed: esphome/components/ds248x/sensor.py -> esphome/components/ds248x/sensor/__init__.py
new file: esphome/components/ds248x/sensor/ds248x_temperature_sensor.cpp
new file: esphome/components/ds248x/sensor/ds248x_temperature_sensor.h
but the commit failed :
$ git commit -m "create sensor directory and restructure"
black....................................................................Passed
flake8...................................................................Passed
Don't commit to branch...................................................Failed
- hook id: no-commit-to-branch
- exit code: 1
pyupgrade................................................................Passed
Can you help me please ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I used github web interface to change my code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be doing your work on a new branch inside your fork, not the dev
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry but as said, I'm a beginner with git. What should I do now?
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I started a discussion about that topic: [One-Wire] I²C Master to 1-wire bus slave adapter #6699 |
Add folder sensor and restructure
Add sensor folder and restructure
Add sensor folder and restructure
Add sensor folder and restructure
Add sensor forder and restructure
Add sensor folder and restructure
Add sensor folder and restructure
Excuse me but I don't know what I should do. |
I would suggest to ask it on the esphome discord, i just recieved the ds2482-100 and i hope this pr got merged. |
What does this implement?
This new component help to build wide and reliable 1-wire network. It support for now only temperature sensors of type ds18b20.
This component is writen to drive ds248x family of I²C to 1-wire bus.
Types of changes
Related issue or feature (if applicable): fixes
Pull request in esphome-docs with documentation (if applicable): esphome/esphome-docs#3792
Test Environment
Example entry for
config.yaml
:Checklist:
tests/
folder).If user exposed functionality or configuration variables are added/changed: