Skip to content

Commit

Permalink
Add support for DS2405 (home-assistant#50148)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored May 20, 2021
1 parent 9eecd90 commit d7c0da9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
8 changes: 8 additions & 0 deletions homeassistant/components/onewire/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@

DEVICE_SWITCHES: dict[str, list[DeviceComponentDescription]] = {
# 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
Original file line number Diff line number Diff line change
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

0 comments on commit d7c0da9

Please sign in to comment.