limych / ha-snowtire Goto Github PK
View Code? Open in Web Editor NEWHome Assistant sensor to predict if it's time to change car tires from summer to winter and vice versa.
License: Other
Home Assistant sensor to predict if it's time to change car tires from summer to winter and vice versa.
License: Other
Sorry for not following the issue template
If you want, I can add some advanced CI to your repo in a PR. Let me know if you want that.
Environment
Describe the bug
Configuration.yaml
Add your configs here if any.
Steps to Reproduce
Expected behavior
Debug log
Add your logs here.
Additional context
Please add a way to add translations to this component.
Environment
Describe the bug
After updating HA to 2023.4 the integration does not load anymore.
Steps to Reproduce
Update to HA core April beta release.
Expected behavior
Integration still works.
Debug log
Logger: homeassistant.config
Source: config.py:1437
First occurred: 20:50:40 (1 occurrences)
Last logged: 20:50:40
Platform error: binary_sensor - cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/__init__.py)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config.py", line 1437, in _async_load_and_validate_platform_integration
platform = await p_integration.integration.async_get_platform(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1072, in async_get_platform
platforms = await self.async_get_platforms((platform_name,))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1147, in async_get_platforms
import_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1135, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1062, in _load_platforms
platform_name: self._load_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1235, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1265, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/config/custom_components/snowtire/binary_sensor.py", line 19, in <module>
from homeassistant.components.weather import (
ImportError: cannot import name 'ATTR_FORECAST' from 'homeassistant.components.weather' (/usr/src/homeassistant/homeassistant/components/weather/__init__.py)
Environment
Describe the bug
The following warning is logged by Home Assistant upon startup:
2023-02-12 23:50:03.979 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 snowtire using this method at custom_components/snowtire/binary_sensor.py, line 147: temperature = convert_temperature(
Configuration.yaml
Add your configs here if any.
Steps to Reproduce
Restart Home Assistant. Observe warning in HA logs.
Expected behavior
Ideally, no warnings would be logged.
Debug log
2023-02-12 23:50:03.979 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 snowtire using this method at custom_components/snowtire/binary_sensor.py, line 147: temperature = convert_temperature(
Additional context
N/A
Is your feature request related to a problem? Please describe.
Add Dutch translation
Describe the solution you'd like
I'd like to contribute the dutch translation
Describe alternatives you've considered
Just adding Dutch translaion
Additional context
Working my way through the template to add Dutch translation
Option 1:
{
"state": {
"snowtire__type": {
"off": "Zomerbanden",
"on": "Winterbanden"
}
}
}
Option 2: might be best due length
{
"state": {
"snowtire__type": {
"off": "Zomer",
"on": "Winter"
}
}
}
file name should be binary_sensor.nl.json
Also the file binary_sensor.uk.json is wrong because that's UA not UK
https://www.iso.org/obp/ui/#iso:code:3166:UA
I've tried to use the installation guide and noticed that this integration is not searchable in HACS repo. Please, consider adding your repo there 🙏🏻
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
German Translation
binary_sensor.de.json
Describe alternatives you've considered
{
"state": {
"snowtire__type": {
"off": "Sommer",
"on": "Winter"
}
}
}
Additional context
The method for providing platform translations has changed in Home Assistant Core, and this integration needs to be updated.
Implement the new method
Drop translations
Details can be found in https://developers.home-assistant.io/blog/2024/03/05/platform_entity_translations_deprecation
I am trying to get the snowtire function active for the Netherlands in my self hosted Home Assistant docker on my nas.
HA is working, all other integrations are ok and working.
I read over and over your documentation but i fail to get the sensor working
Entity gives option "not avalible" error in the config section.
Could you add some extra lines in the documentation?
Some assumptions: The sensor is aware of the location of the HA service (as is my location)
The location is serviced by the wether service > i checked it and it is able to find Leiden (nearby)
I used your example in my sensor config
binary_sensor:
HA Core 2023.11.3
HA Frontend 20231030.2
Checked docu, checked if the webservices weather.gismeteo_daily is existing
2023-12-03 18:01:34.536 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2023-12-03 18:01:34.563 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.snowtire fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 696, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 957, in async_device_update
await self.async_update()
File "/config/custom_components/snowtire/binary_sensor.py", line 160, in async_update
raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: Unable to find an entity called weather.gismeteo_daily
Is your feature request related to a problem? Please describe.
Add support for changing the sensor's icon ❄️ and ☀️.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
version | core-2024.5.2 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
user | root |
virtualenv | false |
python_version | 3.12.2 |
os_name | Linux |
os_version | 6.6.28-haos-raspi |
arch | aarch64 |
timezone | Europe/Brussels |
config_dir | /config |
GitHub API | ok |
---|---|
GitHub Content | ok |
GitHub Web | ok |
GitHub API Calls Remaining | 4998 |
Installed Version | 1.34.0 |
Stage | running |
Available Repositories | 1406 |
Downloaded Repositories | 77 |
HACS Data | ok |
logged_in | true |
---|---|
subscription_expiration | April 26, 2025 at 02:00 |
relayer_connected | true |
relayer_region | eu-central-1 |
remote_enabled | true |
remote_connected | true |
alexa_enabled | false |
google_enabled | true |
remote_server | eu-central-1-7.ui.nabu.casa |
certificate_status | ready |
instance_id | 98df8b6855fd40a682abea6ec3befbad |
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
host_os | Home Assistant OS 12.3 |
---|---|
update_channel | beta |
supervisor_version | supervisor-2024.05.1 |
agent_version | 1.6.0 |
docker_version | 25.0.5 |
disk_total | 458.4 GB |
disk_used | 25.6 GB |
healthy | true |
supported | true |
board | yellow |
supervisor_api | ok |
version_api | ok |
installed_addons | Spotify Connect (0.13.0), Advanced SSH & Web Terminal (17.2.0), File editor (5.8.0), Studio Code Server (5.15.0), Zigbee2MQTT (1.37.0-1), Home Assistant Google Drive Backup (0.112.1), The Lounge (0.19.1), Glances (0.21.1), Uptime Kuma (0.12.1), ESPHome (2024.4.2), Mosquitto broker (6.4.0), Firefox (1.2.0), Silicon Labs Flasher (0.2.3), AirCast (4.2.1), Music Assistant BETA (2.0.0rc1), eBUSd (23.2.5) |
dashboards | 4 |
---|---|
resources | 42 |
views | 15 |
mode | storage |
oldest_recorder_run | April 29, 2024 at 13:03 |
---|---|
current_recorder_run | May 9, 2024 at 19:35 |
estimated_db_size | 722.18 MiB |
database_engine | sqlite |
database_version | 3.44.2 |
api_endpoint_reachable | ok |
---|
async_track_state_change
is deprecated, details here: https://developers.home-assistant.io/blog/2024/04/13/deprecate_async_track_state_change
Install release 1.4.8 and check the error log.
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:190
First occurred: 19:35:17 (7 occurrences)
Last logged: 19:35:52
Detected that custom integration 'snowtire' 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/snowtire/binary_sensor.py, line 126: async_track_state_change(, please create a bug report at https://github.com/Limych/ha-snowtire/issues
No response
Updated to HA version 2024.1.0b0 and saw the following warning.
Fix the deprecation.
n/a
2023-12-28 19:23:24.294 WARNING (MainThread) [homeassistant.const] TEMP_CELSIUS was used from snowtire, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please create a bug report at https://github.com/Limych/ha-snowtire/issues
PS: there is only this template for feature requests, not for a bug report.
Platform error binary_sensor.snowtire - No module named 'homeassistant.util.temperature'
Environment
Describe the bug
Configuration.yaml
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# zeroconf: # Depricated 10 Jun 20
# Application Discovery of items
discovery:
# ignore:
# enable:
# Enable Python Scripts to run (Shelly H&T)
#python_script:
# Need this even though I have default_config:
frontend:
themes: !include_dir_merge_named themes
# Add customization information:
homeassistant:
customize: !include customize.yaml
# Needed to assess health of system
system_health:
# Config for mobile phone app
mobile_app:
cloud:
ios:
stream:
# FFMPEG for ONVIF camera
ffmpeg:
# Text to speech
tts:
- platform: google_translate
# Control and limit size of database
# Lutron Caseta Control
lutron_caseta:
host: !secret loc
keyfile: /ssl/lutron/caseta.key
certfile: /ssl/lutron/caseta.crt
ca_certs: /ssl/lutron/caseta-bridge.crt
# Netatmo detail required before adding in Integrations
netatmo:
client_id: !secret client_id
client_secret: !secret client_secret
# Debug
logger:
default: warning
logs:
homeassistant.components.python_script: debug
homeassistant.components.automation: info
custom_components.snowtire: debug
amcrest: !include video_a.yaml
automation: !include_dir_list automation/
#automation: !include automations.yaml
binary_sensor: !include bsensor.yaml
camera: !include video.yaml
garbage_collection: !include trash.yaml
group: !include groups.yaml
homekit: !include homekit.yaml
input_boolean: !include boolean.yaml
input_select: !include inselect.yaml
recorder: !include recorder.yaml
scene: !include scenes.yaml
script: !include scripts.yaml
sensor: !include sensor.yaml
sonoff: !include sonoff.yaml
weather: !include weather.yaml
Add your configs here if any.
Steps to Reproduce
Searched entities for binary_sensor.snowtire. The resulting list showed several
Expected behavior
I expected there to be only one binary_sensor.snowtire
Debug log
Add your logs here.
```2021-04-13 08:31:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-13 08:31:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration garbage_collection which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-13 08:31:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration gismeteo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-13 08:31:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-13 08:31:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration smartthinq_sensors which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-13 08:31:14 WARNING (MainThread) [homeassistant.loader] You are using a custom integration snowtire which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-13 08:31:14 INFO (MainThread) [custom_components.snowtire.binary_sensor]
-------------------------------------------------------------------
Snowtire Sensor
Version: 1.2.1
This is a custom integration!
If you have ANY issues with this you need to open an issue here:
https://github.com/Limych/ha-snowtire/issues
-------------------------------------------------------------------
2021-04-13 08:32:14 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Current temperature -3.0°C
2021-04-13 08:32:14 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Inspect weather forecast from 2021-04-13 till 2021-04-21
2021-04-13 08:32:14 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Temperature vector: [-3.0, 5, -2, 8, -1, 14, 0, 15, 2, 18, 0, 12]
2021-04-13 08:32:26 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Current temperature -3.0°C
2021-04-13 08:32:26 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Inspect weather forecast from 2021-04-13 till 2021-04-21
2021-04-13 08:32:26 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Temperature vector: [-3.0, 5, -2, 8, -1, 14, 0, 15, 2, 18, 0, 12]
2021-04-13 08:32:26 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Too cold temperature detected!
2021-04-13 08:32:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Current temperature -3.0°C
2021-04-13 08:32:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Inspect weather forecast from 2021-04-13 till 2021-04-21
2021-04-13 08:32:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Temperature vector: [-3.0, 5, -2, 8, -1, 14, 0, 15, 2, 18, 0, 12]
2021-04-13 08:32:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Too cold temperature detected!
2021-04-13 08:33:22 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Current temperature -3.0°C
2021-04-13 08:33:22 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Inspect weather forecast from 2021-04-13 till 2021-04-21
2021-04-13 08:33:22 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Temperature vector: [-3.0, 5, -2, 8, -1, 14, 0, 15, 2, 18, 0, 12]
2021-04-13 08:33:22 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Too cold temperature detected!
2021-04-13 08:33:44 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Amcrest', but will retry later. Error: [Errno 113] Connect call failed ('192.168.4.154', 80)
2021-04-13 08:33:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Current temperature -3.0°C
2021-04-13 08:33:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Inspect weather forecast from 2021-04-13 till 2021-04-21
2021-04-13 08:33:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Temperature vector: [-3.0, 5, -2, 8, -1, 14, 0, 15, 2, 18, 0, 12]
2021-04-13 08:33:53 DEBUG (MainThread) [custom_components.snowtire.binary_sensor] Too cold temperature detected!
**Additional context**
<!--
Add any other context about the problem here.
-->
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.