mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Merge pull request #1914 from robbiet480/uber-metered-fix
Uber: Dont load price sensors for metered (read: taxi/cabs) products
This commit is contained in:
commit
abc00c76bc
@ -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:
|
||||
is_metered = (product['price_details']['estimate'] == "Metered")
|
||||
if 'price_details' in product and is_metered is False:
|
||||
dev.append(UberSensor('price', timeandpriceest,
|
||||
product_id, product))
|
||||
add_devices(dev)
|
||||
|
Loading…
x
Reference in New Issue
Block a user