Add support for DS2405 (#50148)

This commit is contained in:
epenet 2021-05-20 17:02:25 +02:00 committed by GitHub
parent 9eecd90afc
commit d7c0da90c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View File

@ -19,6 +19,14 @@ from .onewirehub import OneWireHub
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",

View File

@ -31,6 +31,28 @@ MOCK_OWPROXY_DEVICES = {
],
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