@@ -233,6 +233,48 @@ class PirateWeatherSensorEntityDescription(SensorEntityDescription):
233
233
icon = "mdi:weather-snowy-rainy" ,
234
234
forecast_mode = ["hourly" , "daily" ],
235
235
),
236
+ "current_day_liquid" : PirateWeatherSensorEntityDescription (
237
+ key = "current_day_liquid" ,
238
+ name = "Current Day Liquid Accumulation" ,
239
+ device_class = SensorDeviceClass .PRECIPITATION ,
240
+ state_class = SensorStateClass .MEASUREMENT ,
241
+ si_unit = UnitOfLength .CENTIMETERS ,
242
+ us_unit = UnitOfLength .INCHES ,
243
+ ca_unit = UnitOfLength .CENTIMETERS ,
244
+ uk_unit = UnitOfLength .CENTIMETERS ,
245
+ uk2_unit = UnitOfLength .CENTIMETERS ,
246
+ suggested_display_precision = 4 ,
247
+ icon = "mdi:weather-rainy" ,
248
+ forecast_mode = ["currently" ],
249
+ ),
250
+ "current_day_snow" : PirateWeatherSensorEntityDescription (
251
+ key = "current_day_snow" ,
252
+ name = "Current Day Snow Accumulation" ,
253
+ device_class = SensorDeviceClass .PRECIPITATION ,
254
+ state_class = SensorStateClass .MEASUREMENT ,
255
+ si_unit = UnitOfLength .CENTIMETERS ,
256
+ us_unit = UnitOfLength .INCHES ,
257
+ ca_unit = UnitOfLength .CENTIMETERS ,
258
+ uk_unit = UnitOfLength .CENTIMETERS ,
259
+ uk2_unit = UnitOfLength .CENTIMETERS ,
260
+ suggested_display_precision = 4 ,
261
+ icon = "mdi:weather-snowy" ,
262
+ forecast_mode = ["currently" ],
263
+ ),
264
+ "current_day_ice" : PirateWeatherSensorEntityDescription (
265
+ key = "current_day_ice" ,
266
+ name = "Current Day Ice Accumulation" ,
267
+ device_class = SensorDeviceClass .PRECIPITATION ,
268
+ state_class = SensorStateClass .MEASUREMENT ,
269
+ si_unit = UnitOfLength .CENTIMETERS ,
270
+ us_unit = UnitOfLength .INCHES ,
271
+ ca_unit = UnitOfLength .CENTIMETERS ,
272
+ uk_unit = UnitOfLength .CENTIMETERS ,
273
+ uk2_unit = UnitOfLength .CENTIMETERS ,
274
+ suggested_display_precision = 4 ,
275
+ icon = "mdi:weather-snowy-rainy" ,
276
+ forecast_mode = ["currently" ],
277
+ ),
236
278
"temperature" : PirateWeatherSensorEntityDescription (
237
279
key = "temperature" ,
238
280
name = "Temperature" ,
@@ -1178,13 +1220,16 @@ def get_state(self, data):
1178
1220
]:
1179
1221
state = round (state * 9 / 5 ) + 32
1180
1222
1181
- # Precipitation Accumilation (mm in SI) to inches
1223
+ # Precipitation Accumilation (cm in SI) to inches
1182
1224
if self .requestUnits in ["us" ]:
1183
1225
if self .type in [
1184
1226
"precip_accumulation" ,
1185
1227
"liquid_accumulation" ,
1186
1228
"snow_accumulation" ,
1187
1229
"ice_accumulation" ,
1230
+ "current_day_liquid" ,
1231
+ "current_day_snow" ,
1232
+ "current_day_ice" ,
1188
1233
]:
1189
1234
state = state * 0.0393701
1190
1235
@@ -1269,6 +1314,9 @@ def get_state(self, data):
1269
1314
"ice_accumulation" ,
1270
1315
"precip_intensity" ,
1271
1316
"precip_intensity_max" ,
1317
+ "current_day_liquid" ,
1318
+ "current_day_snow" ,
1319
+ "current_day_ice" ,
1272
1320
]:
1273
1321
outState = round (state , roundingPrecip )
1274
1322
0 commit comments