Hi, I got rid of the errors, still a couple of warnings, and I’ve tried to get the lighting section to function from lovelace ,But although I have the timing better , the time taken from switching on the wall lights to being shown as home on the gui, the l\mp does not turn off, It turns on \t the given time before dusk and off at 2330 .I also cant get the sun elevation to function as there are complaints its depreciated.
Logger: aiohttp.server
Source: /srv/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py:393
First occurred: 05:28:11 (1 occurrences)
Last logged: 05:28:11
Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 314, in data_received
messages, upgraded, tail = self._request_parser.feed_data(data)
File "aiohttp/_http_parser.pyx", line 546, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadStatusLine: 400, message="Bad status line 'invalid HTTP method'"
haven’t a clue how to get rid of that one
#dummy sensor for sun elevation
# - platform: template#
# sensors:
# sun_elevation:
# friendly_name: Sun Elevation
# unit_of_measurement: "deg"
# entity_id: sensor.time
# entity_id: sensor.sun_elevation
# value_template: "{{state_attr('sun.sun', 'elevation') | round(1) }}"
# scan_interval: '00:05'
# - platform: template
# sensors:
# sun_elevation:
# friendly_name: "Sun Elevation"
# unit_of_measurement: "deg"
# entity_id: sensor.sun_elevation
# icon_template: sun
# value_template: '{{ states.sun.sun.attributes.elevation}}'
At the moment hashed out on configuration.yaml, as I keep getting Log messages the entity_id is depreciated, but which one ?,
The sun elevation is used to switch power from the solar PV panels to the hot water heater , I may be able to remove the need for that entity as I also can measure generated powere
Back to the automation to turn off a lamp if the wall lights are turned on , in lovelace
platform: state
entity_id: device_tracker.esp_552f65_lan, device_tracker.esp_55fd74_lan
to: HOME
from: AWAY
service: switch.turn_off
entity_id: switch.living_room_lamp
In developer tools
device_tracker.esp_552f65
ESP_552F65
not_home source_type: router
ip: 192.168.1.94
mac: b4:e6:2d:55:2f:65
host_name: ESP_552F65
last_time_reachable: 2021-09-30T23:45:10+01:00
reason: no-response
friendly_name: ESP_552F65
icon: mdi:lan-disconnect
When off its shown as “not_home” or “home”
On lovelace its displayed as away or home, and which is correct in the yaml script upper or lower case.
It was so much simpler before integrating in to lovelace
TIA