Closed dlwoals131 closed 4 years ago
I deleted the step 3 then it shows some error also.^^; 2019-11-14 10:10:50 ERROR (MainThread) [custom_components.lywsd02] Could not update data - Failed to connect to peripheral E7:2E:00:D1:04:5B, addr type: public
In most cases message Failed to connect to peripheral E7:2E:00:D1:04:5B, addr type: public
sends if your device placed too far from host.
Oops! I solved the problem/// The problem was space^^; Thanks
The sensor is connected after step 2. Then I add step 3 at Configuration.yaml same as below. Then it shows some error.. Please check Config file, error log, Template editor
Configuration.yaml file
lywsd02: mac: E7:2E:00:D1:04:5B sensor:
sensor:
platform: template sensors: my_temp: friendly_name: "Entrance Temperature" value_template: "{{ states.sensor.my_thermometer.attributes.temperature }}" unit_of_measurement: 'ºC' my_humid: friendly_name: "Entrance Humidity" value_template: "{{ states.sensor.my_thermometer.attributes.humidity }}" unit_of_measurement: '%'
error log
Error loading /config/configuration.yaml: while parsing a block collection in "/config/configuration.yaml", line 24, column 4 expected, but found ''
in "/config/configuration.yaml", line 25, column 5
Template editor
Imitate available variables: {% set my_test_json = { "temperature": 25, "unit": "°C" } %}
The temperature is {{ my_test_json.temperature }} {{ my_test_json.unit }}.
{% if is_state("device_tracker.paulus", "home") and is_state("device_tracker.anne_therese", "home") -%} You are both home, you silly {%- else -%} Anne Therese is at {{ states("device_tracker.anne_therese") }} Paulus is at {{ states("device_tracker.paulus") }} {%- endif %}
For loop example: {% for state in states.sensor -%} {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%} {{ state.name | lower }} is {{state.state_with_unit}} {%- endfor %}.