Skip to content

Commit

Permalink
Finish setup of sensors for V2 features
Browse files Browse the repository at this point in the history
  • Loading branch information
cloneofghosts committed Apr 28, 2024
1 parent 24a061c commit 9bb315c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ pythonenv*
venv
.venv
.coverage
*.db*
*.log*
.HA_VERSION
config/.storage/*
config/blueprints/*
7 changes: 7 additions & 0 deletions custom_components/pirateweather/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@
"nearest_storm_bearing": "Nearest Storm Bearing",
"alerts": "Alerts",
"time": "Time",
"fire_index": "Fire Index",
"fire_index_max": "Fire Index Max",
"smoke": "Smoke",
"smoke_max": "Smoke Max",
"liquid_accumulation": "Liquid Accumulation",
"snow_accumulation": "Snow Accumulation",
"ice_accumulation": "Ice Accumulation",
}

LANGUAGES = [
Expand Down
16 changes: 10 additions & 6 deletions custom_components/pirateweather/manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{
"domain": "pirateweather",
"name": "Pirate Weather",
"codeowners": ["@alexander0042"],
"codeowners": [
"@alexander0042"
],
"config_flow": true,
"dependencies": [],
"dependencies": [],
"documentation": "https://github.com/alexander0042/pirate-weather-ha",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/alexander0042/pirate-weather-ha/issues",
"requirements": ["python-forecastio==1.4.0"],
"version": "1.4.5.1"
}
"issue_tracker": "https://github.com/alexander0042/pirate-weather-ha/issues",
"requirements": [
"python-forecastio==1.4.0"
],
"version": "1.5"
}
4 changes: 4 additions & 0 deletions custom_components/pirateweather/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,27 +377,31 @@ class PirateWeatherSensorEntityDescription(SensorEntityDescription):
name="Fire Index",
state_class=None,
suggested_display_precision=2,
icon="mdi:fire",
forecast_mode=["currently", "hourly"],
),
"fire_index_max": PirateWeatherSensorEntityDescription(
key="fire_index_max",
name="Fire Index Max",
state_class=None,
suggested_display_precision=2,
icon="mdi:fire",
forecast_mode=["daily"],
),
"smoke": PirateWeatherSensorEntityDescription(
key="smoke",
name="Smoke",
state_class=SensorDeviceClass.PM25,
suggested_display_precision=2,
icon="mdi:smoke",
forecast_mode=["currently", "hourly"],
),
"smoke_max": PirateWeatherSensorEntityDescription(
key="smoke_max",
name="Smoke Max",
state_class=SensorDeviceClass.PM25,
suggested_display_precision=2,
icon="mdi:smoke",
forecast_mode=["daily"],
),
"apparent_temperature_max": PirateWeatherSensorEntityDescription(
Expand Down
Empty file modified scripts/develop
100644 → 100755
Empty file.
Empty file modified scripts/setup
100644 → 100755
Empty file.

0 comments on commit 9bb315c

Please sign in to comment.