Carbu_com icon indicating copy to clipboard operation
Carbu_com copied to clipboard

carbu_com.get_lowest_fuel_price_coor Broken?

Open skank01 opened this issue 1 year ago • 2 comments

I dont get any outpute when used... Is it still broken?

skank01 avatar Oct 11 '24 16:10 skank01

Event is triggered, see readme which has full example of usage.

myTselection avatar Oct 11 '24 18:10 myTselection

Hi

I always get an error or no response image

image

skank01 avatar Oct 12 '24 15:10 skank01

The from - to parameters are required when searching for a station in between two location. Then the action/service carbu_com.get_lowest_fuel_price_on_route or carbu_com.get_lowest_fuel_price_on_route_coor should be used. The action you are using requires other parameters, see below. In the developer page you can test services/actions and example parameters with info are shown.


action: carbu_com.get_lowest_fuel_price_coor
data:
  fuel_type: diesel
  latitude: 50.8503
  longitude: 4.3517
  max_distance: 5
  filter: Shell


myTselection avatar Oct 13 '24 09:10 myTselection

hmm, I now see your second screenshot is using the correct action/service. I'll further check this

myTselection avatar Oct 13 '24 09:10 myTselection

Are you sure a valid GEO_API_KEY is set? I've added some validation in R11.2.4 to throw an ServiceValidationError if services are used that require a valid GEO_API_KEY while not set.

myTselection avatar Oct 13 '24 11:10 myTselection

Oops; its still GEO_API_KEY

skank01 avatar Oct 13 '24 13:10 skank01

I added api key, error is gone now and it is triggering, however i dont get any notification

skank01 avatar Oct 13 '24 13:10 skank01

did you setup an automation to trigger on the specific event? see example code on the readme

myTselection avatar Oct 14 '24 07:10 myTselection

I didnt set up an automation, i tried it first using development tools ... using the code from the readme and it doesnt work,. The other does work ! (carbu_com.get_lowest_fuel_price_on_route)

skank01 avatar Oct 19 '24 08:10 skank01

the issue isn't clear to me. Which part is not working? If you don't setup an automation to trigger based on the event, no notification will be shown. So before testing using the development tools, you'll need to setup an automation to show a notification. if that's not the issue, you'll need to share some more details or screenshot

alias: Carbu event
description: ""
trigger:
  - platform: event
    event_type: carbu_com_lowest_fuel_price # or carbu_com_lowest_fuel_price_coor
condition: []
action:
  - service: notify.persistent_notification
    data:
      message: >-
        {{ trigger.event.data.supplier_brand }}: {{ trigger.event.data.price }}€
        at {{ trigger.event.data.distance }}km, {{ trigger.event.data.address }}
mode: single

myTselection avatar Oct 20 '24 10:10 myTselection

Hi,

My friend has the same issue see https://community.home-assistant.io/t/rest-sensor-needs-to-get-latest-element-of-list/404882/20

skank01 avatar Oct 29 '24 18:10 skank01

I'll try to look into into it next week

myTselection avatar Oct 29 '24 21:10 myTselection

HI added some fix to cover sub-municipality, not sure if this would also fix your issue. Please try again. If still an issue, please provide details of the parameters or part of the log file to allow furhter debugging.

myTselection avatar Nov 03 '24 20:11 myTselection