Hi all,
I’m trying to pass data from home assistant to esphome, so I’ve done the following step
- defined a sensor in home assistant as the following
sensor:
- platform: template
sensors:
test:
entity_id: sensor.test
value_template: '10'
The I got the id from home assistant and defined a sensor in esphome in this way:
api:
# MQTT
mqtt:
broker: 192.168.1.190
port: 1883
username: mqtt_user
password: passwordmqtt
# SENSOR
sensor:
- platform: homeassistant
name: "test Sensor From Home Assistant"
entity_id: sensor.test
But the value of the sensor is not showed in the webserver and also if I update the sensor in home assistant nothing happen in esphome
Could you help me? What I made worng?
This is the log form esphome
INFO Reading configuration /config/esphome/test.yaml...
INFO Starting log output from 192.168.1.30 using esphome API
INFO Connecting to 192.168.1.30:6053 (192.168.1.30)
INFO Successfully connected to 192.168.1.30
[19:47:29][I][app:105]: ESPHome version 1.17.2 compiled on May 17 2021, 00:25:26 [19:47:29][C][wifi:443]: WiFi:
[19:47:29][C][wifi:303]: SSID: 'FASTWEB CAPASSO'[redacted]
[19:47:29][C][wifi:304]: IP Address: 192.168.1.30
[19:47:29][C][wifi:306]: BSSID: 78:B4:6A:FD:A1:D0[redacted]
[19:47:29][C][wifi:307]: Hostname: 'test'
[19:47:29][C][wifi:311]: Signal strength: -62 dB ▂▄▆█
[19:47:29][C][wifi:315]: Channel: 11
[19:47:29][C][wifi:316]: Subnet: 255.255.255.0
[19:47:29][C][wifi:317]: Gateway: 192.168.1.1
[19:47:29][C][wifi:318]: DNS1: 0.0.0.0
[19:47:29][C][wifi:319]: DNS2: 0.0.0.0
[19:47:29][C][logger:185]: Logger:
[19:47:29][C][logger:186]: Level: DEBUG
[19:47:29][C][logger:187]: Log Baud Rate: 115200
[19:47:29][C][logger:188]: Hardware UART: UART0
[19:47:29][C][captive_portal:169]: Captive Portal:
[19:47:29][C][web_server:136]: Web Server:
[19:47:29][C][web_server:137]: Address: 192.168.1.30:80
[19:47:29][C][ota:029]: Over-The-Air Updates:
[19:47:29][C][ota:030]: Address: 192.168.1.30:3232
[19:47:29][C][api:095]: API Server:
[19:47:29][C][api:096]: Address: 192.168.1.30:6053
[19:47:29][C][mqtt:051]: MQTT:
[19:47:29][C][mqtt:053]: Server Address: 192.168.1.190:1883 (192.168.1.190) [19:47:29][C][mqtt:054]: Username: 'mqtt_user'[redacted]
[19:47:29][C][mqtt:055]: Client ID: 'test-3c61051d8fc0'[redacted]
[19:47:29][C][mqtt:057]: Discovery prefix: 'homeassistant'
[19:47:29][C][mqtt:058]: Discovery retain: YES
[19:47:29][C][mqtt:060]: Topic Prefix: 'test'
[19:47:29][C][mqtt:062]: Log Topic: 'test/debug'
[19:47:29][C][mqtt:065]: Availability: 'test/status'
[19:47:29][C][homeassistant.sensor:024]: Homeassistant Sensor 'test Sensor From Home Assistant'
[19:47:29][C][homeassistant.sensor:024]: Unit of Measurement: ''
[19:47:29][C][homeassistant.sensor:024]: Accuracy Decimals: 1
[19:47:29][C][homeassistant.sensor:025]: Entity ID: 'sensor.test'
[19:47:29][C][mqtt.sensor:024]: MQTT Sensor 'test Sensor From Home Assistant':
[19:47:29][C][mqtt.sensor:028]: State Topic: 'test/sensor/test_sensor_from_home_assistant/state'