mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Dont load price sensors for metered (read: taxi/cabs) products
This commit is contained in:
parent
69daa383dd
commit
ee9996374c
@ -47,7 +47,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
(product_id not in wanted_product_ids):
|
||||
continue
|
||||
dev.append(UberSensor('time', timeandpriceest, product_id, product))
|
||||
if 'price_details' in product:
|
||||
isMetered = (product['price_details']['estimate'] == "Metered")
|
||||
if 'price_details' in product and isMetered is False:
|
||||
dev.append(UberSensor('price', timeandpriceest,
|
||||
product_id, product))
|
||||
add_devices(dev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user