Dallasng in arduino port expander

I am in need of bidirectional data flow between my esp01 and the arduino port expander. I am able to control switches and lights, but analog data from the analog ports are proving to be more difficult. I am able to get motion detectors to work, but what I really need are dallas one-wire sensors, and have had good luck in the past using the dallasng library (github://nrandell/dallasng). Here is my code:

binary_sensor:
  - platform: custom
    lambda: |-
      return {ape_binary_sensor(expander1, 7), 
              ape_binary_sensor(expander1, 8),
              ape_binary_sensor(expander1, 9),
              ape_binary_sensor(expander1, 10),
              ape_binary_sensor(expander1, 14) // 14 = A0
              };
    binary_sensors:
      - id: switch_1
        name: "switch 1"
        icon: "mdi:button-pointer"
        internal: false
        on_press:
          - light.turn_on: output_1
      - id: switch_2
        name: "switch 2"
        icon: "mdi:button-pointer"
        internal: false
        on_press:
          - light.turn_on: output_2
      - id: pir_sensor0
        name: PIR 0
        device_class: motion
      - id: pir_sensor1
        name: PIR 1 
        device_class: motion
      - id: pir_sensor2
        name: PIR 2
        device_class: motion

dallasng:
  - pin: 14
    update_interval: 4s
    #address: "0x0d3ce1e380717c28"
    #name: "Temperature"
    #resolution: 12
    #expire_after: 300s
    #filters:
    #  - filter_out: NAN
    #  - round: 2

It compiles until it hits the address: 0x0d3ce1e380717c28, then the compiler complains that the syntax is incorrect and the yaml is badly formatted. I am sure this is a simple error, but solution eludes me. :slight_smile:

I might have solved my own problem, and this successfully compiled:

binary_sensor:
  - platform: custom
    lambda: |-
      return {ape_binary_sensor(expander1, 7), 
              ape_binary_sensor(expander1, 8),
              ape_binary_sensor(expander1, 9),
              ape_binary_sensor(expander1, 10),
              ape_binary_sensor(expander1, 14) // 14 = A0
              };
    binary_sensors:
      - id: switch_1
        name: "switch 1"
        icon: "mdi:button-pointer"
        internal: false
        on_press:
          - light.turn_on: output_1
      - id: switch_2
        name: "switch 2"
        icon: "mdi:button-pointer"
        internal: false
        on_press:
          - light.turn_on: output_2
      - id: pir_sensor0
        name: PIR 0
        device_class: motion
      - id: pir_sensor1
        name: PIR 1 
        device_class: motion
      - id: pir_sensor2
        name: PIR 2
        device_class: motion
dallasng:
  - pin: 14
    update_interval: 4s
sensor:
  - platform: dallasng
    id: ape_temperature1
    address: "0x0d3ce1e380717c28"
    name: "APE Temperature1"
    #update_interval: 4s
    resolution: 12
    expire_after: 300s
    filters:
      - filter_out: NAN
      - round: 2

I have not, as of today tried to hook up any sensors, but will do so asap. The PIR’s were just for testing purposes. MQTT messages are present in the logs.