緣由
在使用ESPhome加入SPG30 TVOC sensor時,在元件設定說明頁面看到參數說明
compensation (Optional): The block containing sensors used for compensation. Both values must be supplied in order to be able to generate the absolute humidity to be reported to the sensor.
temperature_source (Optional, ID): Give an external temperature sensor ID here. The data must be in Celsius. This can improve the sensor’s internal calculations.
humidity_source (Optional, ID): Give an external relative humidity sensor ID here. This can improve the sensor’s internal calculations.
這說表示可引入其它sensor所讀取到的溫度與溼度,做為內部演算結果改善用,這裡提到的ID就是這個
從Home assistan找出sensor的entity id
-
進行 home assistant 首頁
-
點「設定」
-
點「裝置與服務」

-
如果是使用ESPhome韌體的就點ESPhome

-
選裝置

-
點感測器的數值

-
彈出圖表後,按右上齒輪

-
會看到「實體ID」這個就是 entity id,可以直接複製

entity id 要轉為 id 才能使用
在設備yaml格式的設定檔中,將entity id對應成id,下面就是將sensor.room_temperature對應至ha_temp,此設定檔內,直接使用ha_temp這個id即可
|
|