diff --git a/components/sensor/cd74hc4067.rst b/components/sensor/cd74hc4067.rst index 5925256a4..1be0db126 100644 --- a/components/sensor/cd74hc4067.rst +++ b/components/sensor/cd74hc4067.rst @@ -14,7 +14,7 @@ and there are also some guides around like the one from `Adam Meyer `) and pass it to the cd74hc4067 sensors with the ``sensor`` option. Each cd74hc4067 sensor is configured for one of the 16 input pins of the multiplexer. @@ -22,20 +22,21 @@ Each cd74hc4067 sensor is configured for one of the 16 input pins of the multipl # Example configuration entry cd74hc4067: - pin_s0: D0 - pin_s1: D1 - pin_s2: D2 - pin_s3: D3 + - id: cd74hc4067_1 + pin_s0: D0 + pin_s1: D1 + pin_s2: D2 + pin_s3: D3 sensor: - - platform: adc + - platform: adc id: adc_sensor pin: A0 - - platform: cd74hc4067 + - platform: cd74hc4067 id: adc_0 number: 0 sensor: adc_sensor - - platform: cd74hc4067 + - platform: cd74hc4067 id: adc_1 number: 1 sensor: adc_sensor @@ -56,13 +57,14 @@ Configuration Variables: ************************ - **sensor** (**Required**, :ref:`config-id`): The source sensor to measure voltage values from, e.g. :doc:`ADC sensor `. +- **cd74hc4067_id** (**Required**, :ref:`config-id`): The id of the cd74hc4067 component to use for this sensor. - **number** (*Required*, int): The number of the cd74hc4067 input pin (0-15) - All other options from :ref:`Sensor `. Application Example ------------------- -In this example, the component is used to measure the AC power output of two solar inverters to integrate them +In this example, the component is used to measure the AC power output of two solar inverters to integrate them as energy sources in `Home Assistant `__. For this purpose, :doc:`CT clamp sensors ` are attached on each of the sensors. @@ -72,42 +74,43 @@ The ``adc`` and ``cd74hc4067`` sensors updates are triggered by the ``ct_clamp`` .. code-block:: yaml cd74hc4067: - pin_s0: D0 - pin_s1: D1 - pin_s2: D2 - pin_s3: D3 + - id: cd74hc4067_1 + pin_s0: D0 + pin_s1: D1 + pin_s2: D2 + pin_s3: D3 sensor: - - platform: adc + - platform: adc id: adc_sensor pin: A0 update_interval: 3600s - - platform: cd74hc4067 + - platform: cd74hc4067 id: solar_1_raw number: 0 sensor: adc_sensor update_interval: 3600s - - platform: cd74hc4067 + - platform: cd74hc4067 id: solar_2_raw number: 1 sensor: adc_sensor update_interval: 3600s - - platform: ct_clamp + - platform: ct_clamp name: "SolarPower1" sensor: solar_1_raw update_interval: 5s unit_of_measurement: "W" device_class: "power" filters: - - lambda: "return x > 0.001 ? x * 56221 : 0;" - - platform: ct_clamp + - lambda: "return x > 0.001 ? x * 56221 : 0;" + - platform: ct_clamp name: "SolarPower2" sensor: solar_2_raw update_interval: 5s unit_of_measurement: "W" device_class: "power" filters: - - lambda: "return x > 0.001 ? x * 57519 : 0;" + - lambda: "return x > 0.001 ? x * 57519 : 0;" See Also --------