Expected a dictionary on INA3221 PlatForm

esphome:
name: persiane_1
platform: ESP32
board: esp32doit-devkit-v1

wifi:
ssid: “”
password: “”

Enable fallback hotspot (captive portal) in case wifi connection fails

ap:
ssid: “Persiane 1 Fallback Hotspot”
password: “”

captive_portal:

Enable logging

logger:

Enable Home Assistant API

api:

ota:

web_server:
port: 80

switch:
#################

home door

#################

  • platform: gpio
    pin:
    number: 26
    inverted: no
    id: a1

  • platform: gpio
    pin:
    number: 27
    inverted: no
    id: a2

  • platform: template
    name: “pers_on”
    icon: “mdi:gate”
    turn_on_action:

    • switch.turn_on: a1
    • switch.turn_off: a2
    • delay: 6000ms
    • switch.turn_off: a2
    • switch.turn_off: a1
  • platform: template
    name: “pers_off”
    icon: “mdi:gate”
    turn_on_action:

    • switch.turn_on: a2
    • switch.turn_off: a1
    • delay: 6000ms
    • switch.turn_off: a2
    • switch.turn_off: a1

i2c:

  • id: bus_a
    sda: 14
    scl: 15
    scan: True

sensor:

  • platform: ina3221
    address: 0x40
    i2c_id: bus_a
    channel_1:
    shunt_resistance: 0.1 ohm
    current:
    name: “INA3221 Channel 1 Current”
    power:
    name: “INA3221 Channel 1 Power”
    bus_voltage:
    name: “INA3221 Channel 1 Bus Voltage”
    shunt_voltage:
    name: “INA3221 Channel 1 Shunt Voltage”
    channel_2:

    channel_3:

    update_interval: 60s

Hi guys when i declare the ina3221 Platform it gives me error EXPECTED a Dictionary on that line. If i change with the ina219 it works. I have to install some libraries? I m using esphome last version with HAss.io. Thanks.

Please see point 11 here: How to help us help you - or How to ask a good question

1 Like