Skip to content

Commit 1158374

Browse files
kelvanclaude
andcommitted
Fix code review issues
- Fix import order in __init__.py - Remove redundant CONF_NAME from config entry data - Remove unused DOMAIN import from binary_sensor and sensor - Use content_type=None in resp.json() to avoid content-type errors Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 978bcbf commit 1158374

6 files changed

Lines changed: 4 additions & 6 deletions

File tree

custom_components/nodeping_status/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
from __future__ import annotations
44

55
from homeassistant.config_entries import ConfigEntry
6-
from homeassistant.core import HomeAssistant
76
from homeassistant.const import Platform
7+
from homeassistant.core import HomeAssistant
88

99
from .const import CONF_REPORT_ID, DOMAIN
1010
from .coordinator import NodePingCoordinator

custom_components/nodeping_status/binary_sensor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from homeassistant.core import HomeAssistant
1111
from homeassistant.helpers.entity_platform import AddEntitiesCallback
1212

13-
from .const import DOMAIN
1413
from .coordinator import NodePingCoordinator
1514
from .entity import NodePingEntity
1615

custom_components/nodeping_status/config_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def async_step_user(
4848
if not errors:
4949
return self.async_create_entry(
5050
title=name,
51-
data={CONF_REPORT_ID: report_id, CONF_NAME: name},
51+
data={CONF_REPORT_ID: report_id},
5252
)
5353

5454
return self.async_show_form(

custom_components/nodeping_status/coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async def _async_update_data(self) -> dict:
3838
raise UpdateFailed(
3939
f"Error fetching report {self.report_id}: HTTP {resp.status}"
4040
)
41-
data = await resp.json()
41+
data = await resp.json(content_type=None)
4242
except UpdateFailed:
4343
raise
4444
except Exception as err:

custom_components/nodeping_status/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
"documentation": "https://github.com/kelvan/ha-nodeping-status",
77
"iot_class": "cloud_polling",
88
"requirements": [],
9-
"version": "0.1.0"
9+
"version": "0.1.1"
1010
}

custom_components/nodeping_status/sensor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from homeassistant.core import HomeAssistant
1010
from homeassistant.helpers.entity_platform import AddEntitiesCallback
1111

12-
from .const import DOMAIN
1312
from .coordinator import NodePingCoordinator
1413
from .entity import NodePingEntity
1514

0 commit comments

Comments
 (0)