limych / ha-temperature-feels-like Goto Github PK
View Code? Open in Web Editor NEWSensor of Temperature Feels Like for Home Assistant.
License: Other
Sensor of Temperature Feels Like for Home Assistant.
License: Other
Hello,
I'm hoping someone can help me fix an issue I'm having with Temperature Feels Like. I feel like I'm missing something simple...
I have installed Temperature Feels Like v0.3.7 via HACS.
I have added the following to my configuration.yaml:
sensor:
- platform: temperature_feels_like
name: "Office temperature feels like"
source:
- sensor.office_temperature_sensor_temperature
- sensor.office_temperature_sensor_humidity
The sensor then only reports "Unknown".
There are two entries in the logs related to Temperature Feels Like:
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/temperature_feels_like/sensor.py:182
Integration: temperature_feels_like (documentation, issues)
First occurred: 19:03:41 (1 occurrences)
Last logged: 19:03:41
Error doing job: Exception in callback TemperatureFeelingSensor.async_added_to_hass.<locals>.sensor_startup(<Event homeassistant_start[L]>) at /config/custom_components/temperature_feels_like/sensor.py:176
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/core.py", line 1114, in _onetime_listener
self._hass.async_run_job(listener, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 641, in async_run_job
return self.async_run_hass_job(HassJob(target), *args)
File "/usr/src/homeassistant/homeassistant/core.py", line 593, in async_run_hass_job
hassjob.target(*args)
File "/config/custom_components/temperature_feels_like/sensor.py", line 182, in sensor_startup
domain = split_entity_id(state.entity_id)[0]
AttributeError: 'NoneType' object has no attribute 'entity_id'
Logger: homeassistant.helpers.entity
Source: util/unit_conversion.py:379
First occurred: 19:03:41 (1 occurrences)
Last logged: 19:03:41
Update for sensor.office_temperature_feels_like fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 550, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 755, in async_device_update
raise exc
File "/config/custom_components/temperature_feels_like/sensor.py", line 318, in async_update
self._temp_val = temp = self._get_temperature(self._temp) # °C
File "/config/custom_components/temperature_feels_like/sensor.py", line 258, in _get_temperature
temperature = TemperatureConverter.convert(
File "/usr/src/homeassistant/homeassistant/util/unit_conversion.py", line 379, in convert
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: % is not a recognized temperature unit.
Any pointers would be greatly appreciated.
Is your feature request related to a problem? Please describe.
Yes. My temperature and humidity sensors update at the same time, but the calculation for the Feels Like Temperature happens twice, back-to-back. This causes strange spikes in the history where there are two values for the same point in time (one value is calculated with the current temperature and old humidity, the other is with current values for both)
Describe the solution you'd like
I'm not sure what the best solution is. Options are:
Describe alternatives you've considered
I have not been able to find an alternative that resolves this issue.
Additional context
I have automations that trigger on a comparison of two Feels Like Temperature sensors, and it is triggered twice as often as it needs to be, with bad data for the first of each trigger. I can set it to restart mode but it still feels like there should be a solution to the sensors getting updated with old data half the time.
Describe the bug
I'm using a weather entity to calculate the feels like temperature, but sometimes the Wind bearing is empty. In these cases, the calculation fails and I get "Unknown" result.
Is it possible to validate the wind availability? If Wind is present, compute as expected, otherwise compute with Temperature and Humidity only.
Configuration.yaml
- platform: temperature_feels_like
name: "Home Feels Like Temperature"
source:
- weather.home
Debug log
Source: custom_components/temperature_feels_like/sensor.py:314
Integration: temperature_feels_like (documentation, issues)
First occurred: 18:16:01 (2 occurrences)
Last logged: 18:16:01
Can't calculate sensor value: some sources are unavailable.
Could you provide some examples of what "source" could look like if someone would want to use a few 'sensor's?
I intend to use a single outside sensor for humidity and then calculate a bedroom "feel like temp" in our house based on a sensor in the room (in celcius). My current config:
sensor:
- platform: temperature_feels_like
name: "Alex Room Feels Like Temp"
source:
- sensor.outside_humidity
- sensor.alex_room_heater_ds18b20_temperature
This current config results in the sensor showing "unknown" in Developer Tools.
The output of in Developer Tools of the two "source" sensors are:
sensor.alex_heater_ds18b20_temperature | 22.6 | unit_of_measurement: °C friendly_name: Alex Heater DS18B20 Temperature device_class: temperature
and:
sensor.outside_humidity | 43 | friendly_name: outside_humidity
I tried the current beta for 2022.06 and there's an import error blocking this plugin:
2022-05-29 11:54:11 ERROR (MainThread) [homeassistant.config] Platform error: sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 877, in async_process_component_config
platform = p_integration.get_platform(domain)
File "/usr/src/homeassistant/homeassistant/loader.py", line 618, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 635, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/config/custom_components/temperature_feels_like/sensor.py", line 13, in <module>
from homeassistant.components.history import LazyState
ImportError: cannot import name 'LazyState' from 'homeassistant.components.history' (/usr/src/homeassistant/homeassistant/components/history/__init__.py)
Hi, the documentation implies that you can use this with specific temperature and humidity sensors but it is unclear how to do that properly, can you update the documentation to include such an example? Thanks!
Hi!
can not read a block mapping entry; a multiline key may not be an implicit key at line 34, column 11:
source:
^
sensor:
- platform: temperature_feels_like
name: 'Room temperature feels like'
source:
- sensor.ble_temperature_climate_sensor
- sensor.ble_humidity_climate_sensor
Environment
Describe the bug
Cannot add a graph tith the sensor's reading to dushboard. The sensor does not show up in the "Statistics Graph Card Configuration" card configuration. According to the information in the card long term statistics are missing.
I can add the sensor to the Gauge graph.
Configuration.yaml
sensor:
- platform: temperature_feels_like
source:
- sensor.tze200_9yapgbuv_ts0601_temperature
- sensor.tze200_9yapgbuv_ts0601_humidity
Steps to Reproduce
Go to "Edit Dashboard" and try adding Statistics Graph card with the sensor.
Expected behavior
The sensors shows up in sensors list of the Statistics Graph card.
Debug log
Add your logs here.
Additional context
Note: This is not a feature request - bug template not available.
After updating to HA 2024.1.2, this plugin no longer seems to respect the unit set in home assistant. Worked perfectly fine before in two circumstances:
configuration.yml
- platform: temperature_feels_like
source: weather.forecast_home
- platform: temperature_feels_like
name: "Bedroom Feels Like Temperature"
source:
- sensor.everything_presence_one_7e9e1c_temperature
- sensor.everything_presence_one_7e9e1c_humidity
Outdoor (Apparently, everyone outdoors is being boiled alive):
I would like this to respect the selection of the unit as it did previously
Attempted to reset and set my unit preference without success
Tried installing/reinstalling without success
None
Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 247: temperature = convert_temperature(
Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 329: convert_temperature(feeling, TEMP_CELSIUS, self.unit_of_measurement), 1
Environment
Describe the bug
Configuration.yaml
Add your configs here if any.
Steps to Reproduce
Expected behavior
Debug log
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:77
First occurred: 4:49:47 PM (3 occurrences)
Last logged: 4:49:47 PM
Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2023.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 247: temperature = convert_temperature(
Detected integration that accesses the `is_metric` property of the unit system. This is deprecated and will stop working in Home Assistant 2023.1. Please adjust to use instance check instead.. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 290: if self.hass.config.units.is_metric
Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2023.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 329: convert_temperature(feeling, TEMP_CELSIUS, self.unit_of_measurement), 1
Additional context
Is your feature request related to a problem? Please describe.
I want to control HVAC in my home according to feels like temperature. I have multiple thermostats and I was wondering if more than one feels like temperature can be used. When I try to only the last stays, even if I define different unique ids.
Describe the solution you'd like
Ability to have more than one feels like sensor.
Describe alternatives you've considered
Additional context
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:77
First occurred: 08:12:29 (2 occurrences)
Last logged: 08:12:29
Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 247: temperature = convert_temperature(
Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2022.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 329: convert_temperature(feeling, TEMP_CELSIUS, self.unit_of_measurement), 1
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:77
First occurred: 08:38:01 (1 occurrences)
Last logged: 08:38:01
Detected integration that accesses the is_metric
property of the unit system. This is deprecated and will stop working in Home Assistant 2023.1. Please adjust to use instance check instead.. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 290: if self.hass.config.units.is_metric
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Inside, I have a template that calculates the "feels-like" from each temperature and humidity sensor on a per room basis, and also takes the average across all rooms.
I'm wondering if you could add the ability to use your own temperature and humidity sensor(s) (obviously the wind factor is removed)
Describe alternatives you've considered
Additional context
HA 2021.5.4
2021-05-15 08:21:06 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback EventBus.async_listen_once.._onetime_listener(<Event homeassistant_start[L]>) at /usr/src/homeassistant/homeassistant/core.py:809
Traceback (most recent call last):
File "/usr/local/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/core.py", line 823, in _onetime_listener
self._hass.async_run_job(listener, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 443, in async_run_job
return self.async_run_hass_job(HassJob(target), *args)
File "/usr/src/homeassistant/homeassistant/core.py", line 424, in async_run_hass_job
hassjob.target(*args)
File "/config/custom_components/temperature_feels_like/sensor.py", line 146, in sensor_startup
self._name = state.attributes["friendly_name"]
KeyError: 'friendly_name'
Configuration.yaml
0.3.9
2024.5.0b0
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:190
First occurred: 22:12:52 (5 occurrences)
Last logged: 22:15:23
Detected that custom integration 'temperature_feels_like' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/temperature_feels_like/sensor.py, line 200: async_track_state_change(self.hass, list(entities), sensor_state_listener), please create a bug report at https://github.com/Limych/ha-temperature-feeling/issues
temperature_feels_like 0.3.5
Home Assistant 2023.1.4
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230110.0 - latest
2023-01-13 16:27:01.162 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2023.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 247: temperature = convert_temperature(
2023-01-13 16:27:01.164 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses temperature utility. This is deprecated since 2022.10 and will stop working in Home Assistant 2023.4, it should be updated to use unit_conversion.TemperatureConverter instead. Please report issue to the custom integration author for temperature_feels_like using this method at custom_components/temperature_feels_like/sensor.py, line 329: convert_temperature(feeling, TEMP_CELSIUS, self.unit_of_measurement), 1
Is it possible to document how the "feels like" temperature is calculated and also how you get to this particular formulae?
Updated to HA version 2024.1.0b0 and saw the following warning.
Fix the deprecation.
n/a
2023-12-28 19:23:27.782 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_HUMIDITY was used from temperature_feels_like, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.HUMIDITY instead, please create a bug report at https://github.com/Limych/ha-temperature-feeling/issues
2023-12-28 19:23:27.788 WARNING (MainThread) [homeassistant.const] DEVICE_CLASS_TEMPERATURE was used from temperature_feels_like, this is a deprecated constant which will be removed in HA Core 2025.1. Use SensorDeviceClass.TEMPERATURE instead, please create a bug report at https://github.com/Limych/ha-temperature-feeling/issues
PS: there is only this template for feature requests, not for a bug report.
...
Detected that custom integration 'temperature_feels_like' calls async_track_state_change
instead of async_track_state_change_event
which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/temperature_feels_like/sensor.py, line 200: async_track_state_change(self.hass, list(entities), sensor_state_listener), please create a bug report at https://github.com/Limych/ha-temperature-feeling/issues
...
.
.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.