Ok, trying to jump back into the creation of this template to combine the two Lyft sensors into a single sensor display.
As things stand right now it displays like this which is far from ideal:
I’d prefer it to show something like this:
Lyft From Home to Work - 16 USD, available in 2 minutes, estimated duration 20 minutes
.
When I view the sensor.lyft_price
entity the state
displayed is 16.28
, the price in dollars. However, there are all of the attributes I really need in the sensor.lyft_price
if I include the sensors state attributes
seen below.
I started to try to try and produce a template and check it in the template editor in Home Assistant and am having trouble getting to what I want to display as the template editor is showing me all of the state attributes, not just the price and time until a vehicle is available using the template below.
TEMPLATE
- platform: template
sensors:
lyft_home_to_kinna_work:
friendly_name: "Lyft From Home to Kinna's Work"
value_template: "{{ states.state.sensor.lyft_price }}, {{ states.sensor.lyft_time }}"
TEMPLATE EDITOR OUTPUT
- platform: template
sensors:
lyft_home_to_kinna_work:
friendly_name: "Lyft From Home to Kinna's Work"
value_template: ", <template state sensor.lyft_time=2; Pickup time estimate (in seconds)=120, Trip distance (in miles)=8.16, icon=mdi:taxi, Trip duration (in seconds)=1628, Cost per minute=20, Prime Time percentage=0%, Service fee=160, Product display name=Lyft, Low price estimate (in cents)=1656, Minimum price=300, Vehicle Capacity=4, friendly_name=Lyft time, High price estimate (in cents)=1656, Cost per mile=95, Price currency code=USD, unit_of_measurement=min, Cancellation fee=500, Base price=170, Product ID=lyft @ 2017-11-10T14:24:45.433956-06:00>"
If someone can provide some guidance as to how I can achieve my goal of displaying the information together it would be greatly appreciated!
GOAL DISPLAY
Lyft From Home to Work - 16 USD, available in 2 minutes, estimated duration 20 minutes
.
Thank you for your help!