Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DS2405 support to onewire #50148

Merged
merged 1 commit into from May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions homeassistant/components/onewire/switch.py
Expand Up @@ -11,6 +11,14 @@

DEVICE_SWITCHES = {
# Family : { owfs path }
"05": [
{
"path": "PIO",
"name": "PIO",
"type": SWITCH_TYPE_PIO,
"default_disabled": True,
},
],
"12": [
{
"path": "PIO.A",
Expand Down
22 changes: 22 additions & 0 deletions tests/components/onewire/const.py
Expand Up @@ -31,6 +31,28 @@
],
SENSOR_DOMAIN: [],
},
"05.111111111111": {
"inject_reads": [
b"DS2405", # read device type
],
"device_info": {
"identifiers": {(DOMAIN, "05.111111111111")},
"manufacturer": "Maxim Integrated",
"model": "DS2405",
"name": "05.111111111111",
},
SWITCH_DOMAIN: [
{
"entity_id": "switch.05_111111111111_pio",
"unique_id": "/05.111111111111/PIO",
"injected_value": b" 1",
"result": STATE_ON,
"unit": None,
"class": None,
"disabled": True,
},
],
},
"10.111111111111": {
"inject_reads": [
b"DS18S20", # read device type
Expand Down