migube
(Migube)
1
hi guys
could you add the DS2450 to the 1-wire supported devices please?
owdir /20.FC4D05000000
/20.FC4D05000000/8bit
/20.FC4D05000000/CO2
/20.FC4D05000000/PIO.ALL
/20.FC4D05000000/PIO.A
/20.FC4D05000000/PIO.B
/20.FC4D05000000/PIO.C
/20.FC4D05000000/PIO.D
/20.FC4D05000000/address
/20.FC4D05000000/alarm
/20.FC4D05000000/alias
/20.FC4D05000000/crc8
/20.FC4D05000000/family
/20.FC4D05000000/id
/20.FC4D05000000/latestvolt.ALL
/20.FC4D05000000/latestvolt.A
/20.FC4D05000000/latestvolt.B
/20.FC4D05000000/latestvolt.C
/20.FC4D05000000/latestvolt.D
/20.FC4D05000000/latestvolt2.ALL
/20.FC4D05000000/latestvolt2.A
/20.FC4D05000000/latestvolt2.B
/20.FC4D05000000/latestvolt2.C
/20.FC4D05000000/latestvolt2.D
/20.FC4D05000000/locator
/20.FC4D05000000/memory
/20.FC4D05000000/pages
/20.FC4D05000000/power
/20.FC4D05000000/r_address
/20.FC4D05000000/r_id
/20.FC4D05000000/r_locator
/20.FC4D05000000/set_alarm
/20.FC4D05000000/type
/20.FC4D05000000/volt.ALL
/20.FC4D05000000/volt.A
/20.FC4D05000000/volt.B
/20.FC4D05000000/volt.C
/20.FC4D05000000/volt.D
/20.FC4D05000000/volt2.ALL
/20.FC4D05000000/volt2.A
/20.FC4D05000000/volt2.B
/20.FC4D05000000/volt2.C
/20.FC4D05000000/volt2.D
e.g
owread /20.FC4D05000000/volt.C
0.0596103
Many thanks!
I would like to join this request. It would be great if the integration supported the DS2450.
Hello,
I have created a working extension of the 1-Wire component with the DS2450. It works very well for me and I wanted to make it available to everyone. I have created a pull request for this (Add device family 20 to support DS2450 1-Wire Quad A/D Converter by panzaeron · Pull Request #99160 · home-assistant/core · GitHub), but I am still missing the test extension. I have created the following in tests/components/onewire/const.py:
"20.111111111111": {
ATTR_INJECT_READS: [
b"DS2450", # read device type
],
Platform.SENSOR: [
{ATTR_INJECT_READS: b" 2.69"},
{ATTR_INJECT_READS: b" 2.15"},
{ATTR_INJECT_READS: b" 0.12"},
{ATTR_INJECT_READS: b" 0.12"},
],
},
When I run the test, I get an error:
FAILED test_binary_sensor.py::test_binary_sensors[20.111111111111] - AssertionError: assert [+ received] == [- snapshot]
FAILED test_sensor.py::test_sensors[20.111111111111] - AssertionError: assert [+ received] == [- snapshot]
FAILED test_switch.py::test_switches[20.111111111111] - AssertionError: assert [+ received] == [- snapshot]
Results (4.08s):
78 passed
3 failed
- tests/components/onewire/test_binary_sensor.py:23 test_binary_sensors[20.111111111111]
- tests/components/onewire/test_sensor.py:27 test_sensors[20.111111111111]
- tests/components/onewire/test_switch.py:30 test_switches[20.111111111111]
Now I’m at a point where I don’t know what to do and hope someone can help me.
1 Like