fix: update lambda return type for hostname text sensor to std::string. compatible with esphome 2025.11

This commit is contained in:
Maciej Pawłowski
2025-11-23 20:11:51 +00:00
parent ae9c3aaf30
commit a1680e9197
4 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ text_sensor:
id: hostname id: hostname
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return id(eth).get_use_address(); return std::string(id(eth).get_use_address());
update_interval: 5min update_interval: 5min
binary_sensor: binary_sensor:

View File

@@ -76,7 +76,7 @@ text_sensor:
id: hostname id: hostname
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return id(eth).get_use_address(); return std::string(id(eth).get_use_address());
update_interval: 5min update_interval: 5min
binary_sensor: binary_sensor:

View File

@@ -76,7 +76,7 @@ text_sensor:
id: hostname id: hostname
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return id(eth).get_use_address(); return std::string(id(eth).get_use_address());
update_interval: 5min update_interval: 5min
binary_sensor: binary_sensor:

View File

@@ -137,7 +137,7 @@ text_sensor:
id: hostname id: hostname
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return id(eth).get_use_address(); return std::string(id(eth).get_use_address());
update_interval: 5min update_interval: 5min
binary_sensor: binary_sensor: