Update PyFlume version, support for multiple state attributes (#38138)
* Update PyFlume version, support for multiple state attributes * Update PyFlume to resolve issue https://github.com/ChrisMandich/PyFlume/issues/7 * Update PyFlume package to 0.5.2, flatten values in sensor * Delete setup * Remove 'current_interval' from attributes and round values to 1 decimal place. * Add missing brackets to remove 'current_interval' from attributes * Set attribute keys explicitly, check attribute format. * Breakout intervals into separate sensors. * Update 'unit_of_measurement' for each sensor, update sensor 'available', remove unusued variables * Update "Device unique ID." Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Update PyFlume, resolve API query update for request. * Cleanup debug logging Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
1 parent
77b6f8c9f2
commit
ae8a38757a
5 files changed
+80
-26
No files matched your search
@@ -6,6 +6,15 @@ PLATFORMS = ["sensor"]
|
||||
DEFAULT_NAME = "Flume Sensor"
|
||||
|
||||
FLUME_TYPE_SENSOR = 2
|
||||
FLUME_QUERIES_SENSOR = {
|
||||
"current_interval": {"friendly_name": "Current", "unit_of_measurement": "gal/m"},
|
||||
"month_to_date": {"friendly_name": "Current Month", "unit_of_measurement": "gal"},
|
||||
"week_to_date": {"friendly_name": "Current Week", "unit_of_measurement": "gal"},
|
||||
"today": {"friendly_name": "Current Day", "unit_of_measurement": "gal"},
|
||||
"last_60_min": {"friendly_name": "60 Minutes", "unit_of_measurement": "gal/h"},
|
||||
"last_24_hrs": {"friendly_name": "24 Hours", "unit_of_measurement": "gal/d"},
|
||||
"last_30_days": {"friendly_name": "30 Days", "unit_of_measurement": "gal/mo"},
|
||||
}
|
||||
|
||||
FLUME_AUTH = "flume_auth"
|
||||
FLUME_HTTP_SESSION = "http_session"
|
||||
@@ -20,3 +29,4 @@ KEY_DEVICE_TYPE = "type"
|
||||
KEY_DEVICE_ID = "id"
|
||||
KEY_DEVICE_LOCATION = "location"
|
||||
KEY_DEVICE_LOCATION_NAME = "name"
|
||||
KEY_DEVICE_LOCATION_TIMEZONE = "tz"
|
||||
Reference in new issue
Block a user