File tree Expand file tree Collapse file tree
custom_components/battery_notes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Constants for battery_notes."""
22
3- import json
43from logging import Logger , getLogger
5- from pathlib import Path
64from typing import Final
75
86import voluptuous as vol
1412
1513MIN_HA_VERSION = "2025.9.0"
1614
17- manifestfile = Path (__file__ ).parent / "manifest.json"
18- with open (file = manifestfile , encoding = "UTF-8" ) as json_file :
19- manifest_data = json .load (json_file )
20-
21- DOMAIN = manifest_data .get ("domain" )
22- NAME = manifest_data .get ("name" )
23- VERSION = manifest_data .get ("version" )
24- ISSUEURL = manifest_data .get ("issue_tracker" )
15+ DOMAIN = "battery_notes"
16+ NAME = "Battery Notes"
2517MANUFACTURER = "@Andrew-CodeChimp"
2618LAST_REPLACED = "battery_last_replaced"
2719LAST_REPORTED = "battery_last_reported"
Original file line number Diff line number Diff line change 2525from .const import (
2626 DEFAULT_LIBRARY_URL ,
2727 FALLBACK_LIBRARY_URL ,
28- VERSION ,
2928)
3029from .coordinator import MY_KEY , BatteryNotesDomainConfig
3130from .discovery import DiscoveryManager
3433_LOGGER = logging .getLogger (__name__ )
3534
3635HEADERS = {
37- "User-Agent" : f"BatteryNotes/ { VERSION } " ,
36+ "User-Agent" : f"BatteryNotes" ,
3837 "Content-Type" : CONTENT_TYPE_JSON ,
3938 "Accept-Encoding" : "gzip" ,
4039}
You can’t perform that action at this time.
0 commit comments