Skip to content

Commit

Permalink
Revert "Merge branch 'beta' into main"
Browse files Browse the repository at this point in the history
This reverts commit 884e1fe, reversing
changes made to a38d315.
  • Loading branch information
tcarwash committed May 31, 2024
1 parent 884e1fe commit f0ea718
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 240 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ logger:
logs:
custom_components.noaa_space_weather: debug
# If you need to debug uncommment the line below (doc: https://www.home-assistant.io/integrations/debugpy/)
#debugpy:
debugpy:
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ pythonenv*
venv
.venv
config/*
swpclib/*
8 changes: 0 additions & 8 deletions custom_components/noaa_space_weather/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,3 @@ async def async_get_data(self) -> dict:
data = {}

return data

async def async_get_first_frame(self, product) -> bytes:
response_json = await self.swpc.get_data_method(product)
first_frame_url = response_json[0].get("url")
return await self.swpc.get_bytes_method(first_frame_url)

async def async_load_animation(self, product) -> bytes:
return await self.swpc.gen_gif(product)
9 changes: 7 additions & 2 deletions custom_components/noaa_space_weather/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@
NAME = "NOAA Space Weather"
DOMAIN = "noaa_space_weather"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "2.1.0-beta"
VERSION = "2.0.1"

ATTRIBUTION = "Data provided by https://services.swpc.noaa.gov"
ISSUE_URL = "https://github.com/tcarwash/home-assistant_noaa-space-weather/issues/"

# Icons
ICON = "mdi:weather-sunny"

# Device classes
# BINARY_SENSOR_DEVICE_CLASS = "connectivity"

# Platforms
PLATFORMS = ["sensor", "image"]
BINARY_SENSOR = "binary_sensor"
SENSOR = "sensor"
SWITCH = "switch"
PLATFORMS = [SENSOR]


# Configuration and options
Expand Down
21 changes: 0 additions & 21 deletions custom_components/noaa_space_weather/entity.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,11 @@
"""NoaaSpaceWeatherEntity class"""

from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.components.image import ImageEntity

from .const import ATTRIBUTION
from .const import DOMAIN


class NoaaSpaceWeatherImageEntity(CoordinatorEntity, ImageEntity):
"""NOAA Space Weather Image Entity"""

def __init__(self, coordinator, config_entry):
super().__init__(coordinator, config_entry)
ImageEntity.__init__(self, coordinator.hass)
self.coordinator = coordinator
self.config_entry = config_entry

@property
def extra_state_attributes(self):
"""Return the state attributes."""
return {
"attribution": ATTRIBUTION,
"id": str(self.coordinator.data.get("id")),
"integration": DOMAIN,
"last_updated": self.image_last_updated,
}


class NoaaSpaceWeatherEntity(CoordinatorEntity):
"""NOAA Space Weather Entity"""

Expand Down
204 changes: 0 additions & 204 deletions custom_components/noaa_space_weather/image.py

This file was deleted.

4 changes: 2 additions & 2 deletions custom_components/noaa_space_weather/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"documentation": "https://github.com/tcarwash/home-assistant_noaa-space-weather",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/tcarwash/home-assistant_noaa-space-weather/issues",
"requirements": ["swpclib==4.3.7"],
"version": "2.1.0-beta5"
"requirements": ["swpclib>=4.2.0"],
"version": "2.0.1"
}
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
homeassistant
pre-commit==2.20.0
black==24.3.0
swpclib>=4.3.7
swpclib>=4.3.2

1 comment on commit f0ea718

@tcarwash
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accidentally merged the wrong direction from beta. beta is definitely not ready to be in main.

Please sign in to comment.