<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>yaml &#8211; IoT-devices, LLC &#8211; Electronics manufacturer for IoT</title>
	<atom:link href="https://iot-devices.com.ua/en/tag/yaml-en/feed/" rel="self" type="application/rss+xml" />
	<link>https://iot-devices.com.ua/en/</link>
	<description>From modules to complex devices</description>
	<lastBuildDate>Sun, 07 Jan 2024 17:34:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://iot-devices.com.ua/wp-content/uploads/2020/05/iot-devices_logo_inversed_kromka_512x512_82ce62_white-100x100.jpg</url>
	<title>yaml &#8211; IoT-devices, LLC &#8211; Electronics manufacturer for IoT</title>
	<link>https://iot-devices.com.ua/en/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>LM75 thermometer: connection to ESP12.OLED_V1 in ESPHome</title>
		<link>https://iot-devices.com.ua/en/lm75-thermometer-connection-to-esp12-oled_v1-in-esphome-en/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Sun, 07 Jan 2024 11:21:20 +0000</pubDate>
				<category><![CDATA[Testing]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[ESP12.OLED]]></category>
		<category><![CDATA[ESP8266]]></category>
		<category><![CDATA[ESPHome]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[I2CHUB_V1]]></category>
		<category><![CDATA[LM75]]></category>
		<category><![CDATA[yaml]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/?p=3228</guid>

					<description><![CDATA[Everyone who is involved in DIY IoT projects is familiar with the LM75 temperature sensor. Termometer LM75 &#8211; it is a cheap and convenient sensor that has sufficient accuracy and measurement range. But its main advantage is that it works via the I2C bus. Why these thermometers are underrated Someone may say that LM75 is [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Everyone who is involved in DIY IoT projects is familiar with the LM75 temperature sensor. Termometer LM75 &#8211; it is a cheap and convenient sensor that has sufficient accuracy and measurement range. </p>

<p class="wp-block-paragraph">But its main advantage is that it works via the I2C bus. </p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/2IO_QsYCPegb15n4XkZZsZDiHSr8LHAXmo0eJKCdHTLIiyRERwwLw8AZLHsOyJnZ_85ciPBnnY23iEOM8HTMqSwMHFZrgcqfWqxqIV2IVVB4kx3fCC8g7F9LLwW0iX_haE7DYUq38NYbpO8Er0IQdGw" alt=""/></figure>

<h1 class="wp-block-heading">Why these thermometers are underrated</h1>

<p class="wp-block-paragraph">Someone may say that LM75 is not the best sensor in terms of its technological features and design as a chip. Indeed, there are many other types of temperature sensors, such as <a href="https://esphome.io/components/sensor/dallas.html?highlight=wire#dallas-temperature-sensor" target="_blank" rel="noopener">1-Wire Dallas DS18b20</a>. These sensors have a one-wire connection and many other design advantages, such as waterproof metallized capsule-shaped housings, etc. It is possible to connect many thermometers to the 1-Wire bus on a single wire, 1-Wire supports error detection and device identification, etc.</p>

<p class="wp-block-paragraph">But the 1-Wire bus has one and the most important drawback &#8211; there are no other devices for this bus except thermometers. That&#8217;s not exactly true, they are produced, but it&#8217;s such an unpopular segment that they are impossible to buy.</p>

<p class="wp-block-paragraph">When we need to build a device of medium complexity, such as a weather station, several different sensors and other peripherals need to be connected to the main controller (a list, for example):</p>

<ul class="wp-block-list"><li>BME680 / BME280 I2C / SPI;</li><li>DS18b20 1-Wire;</li><li>SPI / I2C display;</li><li>Lightning sensor AS3935 SPI / I2C;</li><li>Light sensor MAX44009 I2C;</li><li>Temperature and humidity HDC1080 I2C;</li><li>CCS811 I2C sensor;</li><li>SCD4X I2C sensor.</li></ul>

<p class="wp-block-paragraph">And even with the powerful ESP32 (not to mention the ESP8266 and similar controllers, such as Arduino or RPI Pico W), we will have to solve the problem of optimizing the number of interfaces and protocols. After all, the processing of several different protocols will sooner or later affect our development and will require simplification not only on the hardware side (budget of free I/O ports), but also the software implementation of drivers for different protocols and interfaces that must run in parallel in the main loop of the controller.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><em><strong>Note.</strong> We are not writing about SPI here, because it is a specialized protocol with a completely different purpose and strengths that apply only to exceptional situations when it comes to sensors.</em></p></blockquote>

<p class="wp-block-paragraph">Therefore, in our opinion, you should choose solutions that can be easily expanded and operated in the future. 1-Wire and SPI devices are not well suited for such requirements and therefore we recommend not considering them unless it is absolutely necessary (as in the SPI case for high-resolution displays or measuring values at near real-time speeds).</p>

<p class="wp-block-paragraph">It is worth trying to build an optimal hardware and software solution &#8211; we take a step towards the I2C bus. That is, since we will have an SSD1306 display with I2C on the main controller, an <a href="https://iot-devices.com.ua/en/product/i2cui4v1-user-interface-i2c-module-with-5keys-keypad-rgb-led-buzzer/">I2CUI4_V1</a> keypad with I2C, why would we need to install temperature sensors with any other interface? &#8211; So we decided to use only the I2C bus. All connections will be made through the <a href="https://iot-devices.com.ua/en/product/i2chub-v1-module-i2c-bus-interfaces-splitter/">I2CHUB_V1</a>, splitter/hub, which supports the connection of 5 devices to the controller at the same time.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><em><strong>Note.</strong> As a reminder, I2C is a great bus &#8211; it not only allows you to connect many devices simultaneously, but also provides the ability to identify devices on the bus, control erroneous data, and hot-swap (connect and disconnect devices by the user on the go).</em></p></blockquote>

<h1 class="wp-block-heading">Built-in drivers in ESPHome</h1>

<p class="wp-block-paragraph">However, when we search on the ESPHome website, it turns out that the LM75 sensor, which we were going to use in the project as a thermometer, is not supported &#8211; there is no built-in driver.</p>

<p class="wp-block-paragraph">We begin to do our own little investigation into the available drivers in ESPHome for temperature sensors like the LM75 ($0.89 USD on Mouser). And we find out that there are two other thermometers for which a built-in driver is already written in ESPHome:</p>

<ul class="wp-block-list"><li><a href="https://esphome.io/components/sensor/mcp9808" target="_blank" rel="noopener">MCP9808</a> (1.39 USD on Mouser)</li><li><a href="https://esphome.io/components/sensor/tmp1075" target="_blank" rel="noopener">TMP1075</a> (0.74 USD on Mouser)</li></ul>

<p class="wp-block-paragraph">Both sensors would have suited us technically. They are available on Mouser and other similar platforms. But we could not find ready-made modules with these chips at a price that would be close to the price of modules with LM75. </p>

<p class="wp-block-paragraph">We thought that this was not acceptable to us, as it would not be to most of our readers. Given the similarity of these chips, no one wants to overpay 5-10 times for a thermometer module if you can buy an LM75-based module in every store.</p>

<p class="wp-block-paragraph">Interestingly, the TMP1075 sensor is compatible with the LM75 specification (this is clearly stated in the datasheet), which is de facto the industry standard. Therefore, we concluded that we could try to connect our LM75 thermometer with the drivers for TM1075 that are built into ESPHome.</p>

<p class="wp-block-paragraph">Unfortunately, we failed to make such a connection, even though the addressing on the bus and the internal registers are identical for the mentioned sensors. The only difference is that the TMP1075 also has a special identification register, which the LM75 sensor does not have. But even attempts to make changes to the sensor type checking at the CPP-code level of this driver did not allow us to use it with the LM75 chip.</p>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><em><strong>Note.</strong> To be honest, we still don&#8217;t understand why the developers and contributors of ESPHome haven&#8217;t made a built-in driver for the LM75 yet. We wouldn&#8217;t have to write this article and spend a lot of time doing strange experiments.</em></p></blockquote>

<p class="wp-block-paragraph">So we went back to the starting point and did what we should have done from the very beginning. </p>

<h1 class="wp-block-heading">Connecting the driver externally</h1>

<p class="wp-block-paragraph">As you probably know, ESPHome has at least two mechanisms for connecting custom device drivers from the outside: <a href="https://esphome.io/components/sensor/custom.html" target="_blank" rel="noopener">Custom Component</a> and <a href="https://esphome.io/components/external_components" target="_blank" rel="noopener">External Component</a>. </p>

<p class="wp-block-paragraph">Custom component is currently considered an obsolete integration option and is not recommended by the ESPHome documentation. </p>

<p class="wp-block-paragraph">Instead, the documentation recommends using another, alternative way, which in our opinion is currently the only, easiest and best way to perform driver integration yourself &#8211; External Component. </p>

<p class="wp-block-paragraph">The difference of the External Component is that the ESPHome user does not manually write interfaces for data flows from the sensor through low-code roundabouts, but uses fully defined mechanisms, which, by the way, are also used by all other ESPHome components:</p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/fhNnFHCjYoYeeW3YgVORrZe0q2lyXcUaa4xA8T0t9_3djudr-Oh-DGAgBgDhDNXycpoDgDG9s8-TOZv4eebVcJ_4TYSi3_V_7k1PN8ohzUPVyY3GptHfUwkf9InA6ttQ86HDp9OkrFDhmrSe6FOTOlc" alt=""/></figure>

<p class="wp-block-paragraph">So, to connect an External Component, you first need to describe its mapping correctly. We won&#8217;t dive into the details of programming and configurations here, because we found a ready-made component for the LM75 on GitHub.</p>

<p class="wp-block-paragraph">To add LM75 sensors, you only need to add a few lines to the YAML configuration of the device in ESPHome:</p>

<ul class="wp-block-list"><li>connect an external component (External Component):</li></ul>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/GiggLaW8SoWJlEFXlWf7k0F6WK3AhbYfrN4R9S5W1FnR0UnApOTweIlfQ8pNje9f1YZFrwnXBVIoWiidj9D1r-9eVaScu6LnZc6xZvGNTWcdagqLFWJJDIXOGLf37IgnxLXaHlJa5sfalcPoYj0NQ_g" alt=""/></figure>

<ul class="wp-block-list"><li>add LM75 sensor entities:</li></ul>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/l7JbCPB76qDdLuZWnWDmjvXdPfJS0COrbhYlSTKwOD-kiEt7DxrkwiUMFcYOvfVGLgImvW9zC7h8X3J3ViYwVggYGbuqlPpwfuLTE8TPDJHVq1E67OW8PRd__e0lSMbPyPUV6RVn8_zN4vaUVps700A" alt=""/></figure>

<p class="wp-block-paragraph">For convenience, we have forked the esphome-lm75 repository provided by <a href="https://github.com/btomala" target="_blank" rel="noopener">https://github.com/btomala</a> on GitHub to our account <a href="https://github.com/iotdevicesdev/esphome-lm75" target="_blank" rel="noopener">https://github.com/iotdevicesdev/esphome-lm75</a></p>

<p class="wp-block-paragraph">An example of how the connection of LM75 drivers for the ESP12.OLED_V1 controller manufactured by IoT-devices, LLC looks like in ESPHome:</p>

<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># YAML Config Example
esphome:
  name: esp12oled-lm75
  friendly_name: esp12oled-lm75
  comment: "Configuration example of two LM75 for ESP12.OLED_V1 with ESPHome firmware"
  project:
    name: "iot-devices.esp12oled-lm75"
    version: "1.0.0"


external_components:
  - source: github://iotdevicesdev/esphome-lm75
    components: [ lm75 ]


esp8266:
  board: nodemcuv2


logger:


api:
  encryption:
    key: "8tDDLc3S5dnSjADItGR5+7KxoUBhUIqeOiJZIXy"


ota:
  password: "c15e9a44e1408352d945b8cd35b79"


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password


  ap:
    ssid: "Test-Node Fallback Hotspot"
    password: "rtF1XxDZ9"


captive_portal:


i2c:
  sda: 4
  scl: 5
  id: i2c_bus


sensor:
  - platform: lm75
    id: temperature
    name: "LM75 temperature"
    update_interval: 30s
    address: 0x48


  - platform: lm75
    id: temperature2
    name: "LM75 temperature2"
    update_interval: 30s
    address: 0x49
# END YAML Config Example
</pre>

<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p><em><strong>Note.</strong> This code is also available on our GitHub: <a href="https://github.com/iotdevicesdev/ESP12.OLED_V1-LM75-ESPHome" target="_blank" rel="noopener">github.com/iotdevicesdev/ESP12.OLED_V1-LM75-ESPHome</a> </em></p></blockquote>

<h1 class="wp-block-heading">Project components</h1>

<p class="wp-block-paragraph">1 x <a href="https://iot-devices.com.ua/en/product/esp12oled-universal-esp8266-mcuboard-oled-en/">ESP12.OLED_V1</a> module with ESPHome 2023.12.5 firmware;</p>

<p class="wp-block-paragraph">1 x <a href="https://iot-devices.com.ua/en/product/i2chub-v1-module-i2c-bus-interfaces-splitter/">I2CHUB_V1</a> module:</p>

<p class="wp-block-paragraph">1 x LM75 module (no brand);</p>

<p class="wp-block-paragraph">1 x CJMCU-75 module.</p>

<h1 class="wp-block-heading">Project results</h1>

<p class="wp-block-paragraph">This is the main thing we wanted to tell you in this text:</p>

<ol class="wp-block-list"><li>We have connected the LM75 via the External Component mechanism so easily and simply that we could not believe it ourselves after some complicated experiments with the TMP1075 driver.</li><li>The dependencies are pulled directly from GitHub, or can be linked from a local repository on your ESPHome/HomeAssistant drive. The External Component connected in this way is automatically included in the firmware during its compilation.</li><li>We have verified that there are no problems with addressing multiple LM75 sensors simultaneously with this component.</li><li>It&#8217;s as simple as connecting a sensor with a built-in driver like BME280 to ESPHome. The simplicity of using an off-the-shelf component via the External Component method is nothing compared to using the obsolete Custom Component method that we used to do for our other applications with the VEML6070 UV sensor. </li></ol>

<p class="wp-block-paragraph">As you can see in the following screenshots, our project has been successfully completed:</p>

<ul class="wp-block-list"><li>LM75 is connected to the ESP12.OLED_V1 controller with ESPHome firmware;</li><li>Two LM75 sensors work simultaneously with the main controller. Where two sensors work, eight can work (if necessary, the LM75 has three I2C address pins, which allows you to work with eight sensors on each I2C bus at the same time);</li><li>The data from the sensors is sent to Home Assistant and displayed on the Dashboard;</li><li>Further, the sensor values can either be displayed independently on the ESP12.OLED_V1 controller display using the ESPHome firmware, and/or can be used in Home Assistant automation scenarios.</li></ul>

<h2 class="wp-block-heading">LM75 sensor values on the Home Assistant server Dashboard:</h2>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/acaO4mGBATm3R6jzes0mGzzjmRyzUxaL-6iyqv6N8WU7OFE9OMSp491EVcjqcoUL2GHRmAxIZWZJD9XeAB4dOspKdLGxDZWCB3UIDyG3vkJV7-xwE7sH3eahGRzSWIz3SupGSo_-pjFTKhunHcEo9EI" alt=""/></figure>

<h2 class="wp-block-heading">Graphs from the Home Assistant server&#8217;s Logbook:</h2>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/ptCieHiX5fvP03Sls1EwV4lyliuggL_4NYJglhDjCkdg91jMyGi3wF-6hKYWzKgxDSWx8MRz1lAyHZNT9OI7g0krtebesXDgHHKJJUjNtEahWW_jL2xIx7jqzUDsyAudWB-GPFNB6tc6LTBZlw1dKKU" alt=""/></figure>

<h2 class="wp-block-heading">LM75 sensor values in the Developer Tools menu of the Home Assistant server:</h2>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/D6khohe5sku1MkzapvAicnvyQcwPRACHO-GXe5PQARDyUtOy0FIlymy-ood33FKdA-Amjys9B9mMLQ8hot69UCZd6449YPOR1PjAHGc6ICtuCZt51_j-XG7l9hJSPqvOvQ9b_0GwdtUWBTTEqpms8vQ" alt=""/></figure>

<h2 class="wp-block-heading">Screenshots of the ESPHome console:</h2>

<ul class="wp-block-list"><li>Devices found during I2C bus scan (display and two thermometers)</li></ul>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/NJerrlBsGoKpzLNQ5Pbv-erEZkMrZNETE3dMAzkqdfoCPEukPqyjZ8Qb9c7Kpx4pNYH1HSO9vxPxJJkdm5mp-aGXt1DtQK4-MZklgLQOiRsd83zjYum4m9UeYDY4IcFsnflwP-mbxyCiokCRWt0bbVI" alt=""/></figure>

<ul class="wp-block-list"><li>Drivers for LM75 sensors initialized</li></ul>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/Y7ulzeeq0M9KBePJRl0vvtU-EVObTNn3n-RDIPB-lsAx9rVp_xdmsYoW5_bpZKXzwm08S5ZVoeTRvkq7NZiFMph-ojmhF2yqRL0wJe4d5-wZwFr8yaTsQp0LINUNUIZBo_niNpuNh_BNlyaAY6-ybKU" alt=""/></figure>

<ul class="wp-block-list"><li>ESPHome receives sensor data and transmits it to Home Assistant</li></ul>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/pySE4l9JF_jNWySJ03bDw-1hr8PlL6w6rLtDvjQY6HAwzeB0JFCVAF_7vR5Ypxn7K6Ccm4zrnKLoQqJmCiKCKPPzzfuQFCAB9ouBUG_m2V_R4u7-QxvvxcnrxD9CnVZvCGSb4RvcW2_K9EpbD3tFrw8" alt=""/></figure>

<p class="wp-block-paragraph">That&#8217;s all we have planned to discuss on this topic for now.</p>

<p class="wp-block-paragraph">Thank you for your attention!</p>

<p class="wp-block-paragraph">Good luck!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>About changes in ESPHome configuration validation &#8211; Pin Reuse validation</title>
		<link>https://iot-devices.com.ua/en/about-changes-in-esphome-configuration-validation-pin-reuse-validation-en/</link>
		
		<dc:creator><![CDATA[iot-guru]]></dc:creator>
		<pubDate>Fri, 05 Jan 2024 13:05:44 +0000</pubDate>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ESPHome]]></category>
		<category><![CDATA[GGreg20_V3]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[yaml]]></category>
		<guid isPermaLink="false">https://iot-devices.com.ua/?p=3220</guid>

					<description><![CDATA[Recently, the ESPHome firmware has been changed to prevent the same controller I/O ports from being reused to create different entities. This mechanism is called Pin Reuse validation: https://esphome.io/changelog/2023.12.0.html#pin-reuse-validation These updates in ESPHome version 2023.12.0 also affected the examples developed by our company for the GGreg20_V3 Geiger counter ionizing radiation detector module. According to the [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">Recently, the ESPHome firmware has been changed to prevent the same controller I/O ports from being reused to create different entities.</p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/NbMNFqAgMd6hpZWh-NXKLErqXahzagxGzuFmMuTS-pOh1kLpEa0c3RNqNSzc3sHs_L5xhrqexi882bwe6vmlPBunFqvNpaia62ckDj0jKklpRWig2qTRTOSN_sgx3lsHbxyk9dNmbbe-ZTtzwnI6B8I" alt=""/></figure>

<p class="wp-block-paragraph">This mechanism is called Pin Reuse validation: https://esphome.io/changelog/2023.12.0.html#pin-reuse-validation</p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/al5mD8CoLfniPx9Wa-BU1sn4zydlCeLW4Wf893gfEzsXhYkR9asb_Bz10rJvE1mCRTV_qMMjSbQNDINUbw8e9SLkCRnpZS3G2m0X1Vx_PiE0AjiYdQjptfwD_p974q91ikm2pzwRGOME8sPwvugsy8c" alt=""/></figure>

<p class="wp-block-paragraph">These updates in ESPHome version 2023.12.0 also affected the examples developed by our company for the GGreg20_V3 Geiger counter ionizing radiation detector module. </p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/5L3UxVVlENtNnMlume0WJMJHI37oR2ElKCXLiYYSn1VyfVqxqpPE4SjYiDFPUtmh6z9FuZedfXyP-8mJVI7m4go2yYCBGNLCewTZl7uowzU59TZHKDTWN8UMefsV8qoUlQai8VyhAEvcnMs9N2uITcA" alt=""/></figure>

<p class="wp-block-paragraph">According to the user&#8217;s request (https://github.com/iotdevicesdev/GGreg20_V3-ESP32-HomeAssistant-ESPHome/issues/2) regarding the repository for GGreg20_V3-ESP32-HomeAssistant-ESPHome, we have made the necessary updates to the configuration YAML file. </p>

<p class="wp-block-paragraph">Now this example will work properly with the new ESHome configuration validation and you will be able to upgrade to newer versions of ESPHome without any problems.</p>

<p class="wp-block-paragraph">We also plan to update other repositories with this issue.</p>

<p class="wp-block-paragraph">You can also make changes to your ESPHome YAML configuration files yourself. </p>

<p class="wp-block-paragraph">As of now, we know of two ways to fix the configuration so that it passes the new configuration validation rules:</p>

<p class="wp-block-paragraph"><strong>Way #1.</strong> If you need to reuse the pin, use https://esphome.io/components/copy.html instead</p>

<p class="wp-block-paragraph">This is the more correct path that we recommend using.</p>

<p class="wp-block-paragraph">For sensor entities:</p>

<p class="wp-block-paragraph"><a href="https://esphome.io/components/copy.html#copy-sensor" target="_blank" rel="noopener">https://esphome.io/components/copy.html#copy-sensor</a></p>

<p class="wp-block-paragraph">For binary sensor entities:</p>

<p class="wp-block-paragraph"><a href="https://esphome.io/components/copy.html#copy-binary-sensor" target="_blank" rel="noopener">https://esphome.io/components/copy.html#copy-binary-sensor</a></p>

<p class="wp-block-paragraph">An example of the code you should get is given here:</p>

<p class="wp-block-paragraph"><a href="https://github.com/iotdevicesdev/GGreg20_V3-ESP32-HomeAssistant-ESPHome/issues/2#issuecomment-1867814996" target="_blank" rel="noopener">https://github.com/iotdevicesdev/GGreg20_V3-ESP32-HomeAssistant-ESPHome/issues/2#issuecomment-1867814996</a></p>

<p class="wp-block-paragraph"><strong>Way #2.</strong> You can also use the exception described in the ESPHome Pin Schema document:</p>

<p class="wp-block-paragraph"><a href="https://esphome.io/guides/configuration-types#config-pin-schema" target="_blank" rel="noopener">https://esphome.io/guides/configuration-types#config-pin-schema</a></p>

<p class="wp-block-paragraph">config key: &#8220;allow_other_uses&#8221;</p>

<p class="wp-block-paragraph">You can use this config key to override the control of reusing pins in exceptional situations. </p>

<p class="wp-block-paragraph">Please note that the key must be specified not only in duplicate entities, but in each entity where a particular pin is used for the configuration to pass validation:</p>

<p class="wp-block-paragraph">Wrong keys:</p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/brK3IMK56GkE7Naz0ylxpNNlaZTm-JOUG4uYq_uFc6Zq6XTr67ROnrjGh_jJOepI1EmVQ3lHEctRRHz0gLsEzCW6VkVYnW8g1qFLWjyaylBBnpE6bY2aBEqnJXnEpJi7wnP9eVHXtVHv3rfN4f1ULsI" alt=""/></figure>

<p class="wp-block-paragraph">Right keys:</p>

<figure class="wp-block-image"><img decoding="async" src="https://lh7-us.googleusercontent.com/_3ZcmuT-cY6legairb3Ljg8eRLvQNcJSwg0NanYRmLRuSwUggLnJby9ezW7WNrGrrvPMRYH3iqQ0vsBppkuRMCO58xj70t7f3QGf3UG-LFUvgJvysG4eIIyAy1RVGJp8vCMDEPGNSMaz7dBbMm1Qc3c" alt=""/></figure>

<p class="wp-block-paragraph">You should get the following code using the &#8220;alow_other_uses&#8221; key:</p>

<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group=""># YAML code example:
- platform: pulse_counter
    pin: 
      number: GPIO2
      allow_other_uses: true
    state_class: "measurement"
    unit_of_measurement: 'CPM'
    name: 'Ionizing Radiation Power CPM'
    count_mode: 
      rising_edge: DISABLE
      falling_edge: INCREMENT # GGreg20_V3 uses Active-Low logic
  # It seems that only one instance of pulse counter internal filters can be set
  # So here no any debounce filters for CPM value 
    use_pcnt: False
    internal_filter: 180us
    update_interval: 60s
    accuracy_decimals: 0
    id: my_cpm_meter
 
  - platform: pulse_counter
    pin:
      number: GPIO2
      allow_other_uses: true
      inverted: True
      mode: 
        input: True 
        pullup: False
        pulldown: False
    unit_of_measurement: 'uSv/Hour'
    name: 'Ionizing Radiation Power'
    count_mode: 
      rising_edge: DISABLE
      falling_edge: INCREMENT
    update_interval: 60s
    accuracy_decimals: 3
    id: my_dose_meter
    filters:
  #    - sliding_window_moving_average: # 5-minutes moving average (MA5) here
  #        window_size: 5
  #        send_every: 1      
      - multiply: 0.0057 # or 0.00332 for J305 by IoT-devices tube conversion factor of pulses into uSv/Hour
# END of YAML code example
</pre>

<p class="wp-block-paragraph">You can choose which of the methods suits your DIY project.</p>

<p class="wp-block-paragraph">That&#8217;s all. Good luck!</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
