Giter VIP home page Giter VIP logo

pid_integration's People

Contributors

dvejsada avatar jirutka avatar sinacek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pid_integration's Issues

Remove unnecessary attributes

Remove attributes provided by API that are not used in practice to reduce amount of data being written into database.

Creation of custom card

I would appreciate help with creation of custom card to display departure board info from this component in useful way on dashboard.

x.match is not a function

Hi, I recently updated the integration and as expected my dashboard had issues (using Flex table card).
I corrected all entities but even then I just get an error message instead of the table that says x.match is not a function
Any ideas? I only modify the stop name and entities with wildcard.
Flex card yaml looks like this:

type: custom:flex-table-card
title:
  - Černý Most
entities:
  include:
    - sensor.cerny_most_15_next_route_name_*
columns:
  - data: departure_timestamp.scheduled
    name: TIME
    modify: x.match(/[0-9]{2}:[0-9]{2}/);
  - data: state
    name: LINE
  - data: trip.headsign
    name: DESTINATION
  - data: delay
    name: DELAY
    modify: |-
      if (x.is_available){
        x.minutes + " min."
      } else {
        "-"
      };

Any ideas?

Chyba při přidání zastávky Všenory ŽST

Při přidání zastávky 2279_1 (Všenory,žel.zast.) nevidím žádné entity.
Verze: dea4a31

V Logu je chyba:
2024-02-10 23:44:48.928 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up pid_integration platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/pid_integration/sensor.py", line 20, in async_setup_entry new_entities.append(DepartureSensor(departure_board.departures[i], departure_board)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/pid_integration/sensor.py", line 44, in __init__ self._state = self._departure_board.extra_attr[self._departure]["route"]["short_name"] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ IndexError: list index out of range

Choice of specific line

Bylo by super, pokud by bylo možné jednoduše vypsat jen odjezdy jedné, případně několika linek místo všech odjezdů z konkrétní zastávky.

Could not add integration

I downloaded your project (version 0.2), copied files to custom_components folder. Restarted home assistant. Then I clicked on "add integration" button, selected "PID Departure Boards" and got error:

Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

error.log

Assign unique_id to instances

Assign unique_id to each departure board to prevent setting similar aswIds twice which may cause issues with entity naming.

Golemio API - formát URL

I got an email from operátor ICT - afaik I only use golemio in this integration, so I guess it's related

Dobrý den,
zaznamenali jsme, že voláte naše api.golemio.cz buď s přebytečným lomítkem na konci "/" nebo otazníkem "?" bez dalších parametrů. V rámci optimalizace našich služeb řešíme i kešování. V případě že ke stránce se přistupuju pod 2 různými URL, tak se pak i 2x kešuje. Plánujeme zavést automatický redirect (kod 301) na zkrácenou verzi, ale nejdříve chceme na to naše uživatele upozornit, aby to mohli upravit sami, protože některým by redirect nemusel fungovat.
Příklady nechtěných URL:
/v2/pid/departureboards/?ids=U693Z2P&total=3&preferredTimezone=Europe%2FPrague&minutesBefore=-9
/v2/pid/departureboards/
/v2/pid/departureboards/?
/v2/pid/departureboards?
/v2/vehiclepositions/gtfsrt/alerts.pb/
Budeme rádi, když si to upravíte, protože tím budeme vědět, že se vám chování api nebude měnit.
Děkujeme

Umožnit uložení API key do konfiguračního souboru

Buď manuálně nebo jej uložit po prvním přidání automatizace a při dalších už jej nevyžadovat. Nebo jen pokud bude v konfiguraci (s manuálním zadáním), tak jej nevyžadovat. Je otravné jej stále dokolečka kopírovat když to člověk zkouší než najde správné parametry.

Custom data filtering

I am new in Home Assistant world so maybe I am missing something but I was unable to find a way how to filter data displayed by flex-table-card. And by filtering I mean for example filtering by trip_headsign.

What I want to achieve is to display trains departing from Praha-Smíchov but I am only interested in direction out of the city, not to Praha hl.n..

I had expected to be able to filter either in flex-table-card entities or somewhere in between PID integration and the dashboard but found nothing :-)

Am I missing something or is the only way to add a custom filtering feature to PID integration itself?

Chyba při zadání API key

Zdravím,
po stažení nové verze jsem se dostal k dialogovému oknu nastavení integrace, ale ani na několik pokusů a s dvěma novými klíči API z Golemio se nechce posunout dále a vyhodí chybu "Unknown API connection error".

Je taky možné, že zadávám zastávku ve špatném formátu. Zkoušel jsem přidat celý řádek ze stops_list.txt i různé části názvu zastávek, ale bez úspěchu.
Log je níže.

Tato chyba pochází z vlastní integrace.

Logger: custom_components.pid_integration.config_flow
Source: custom_components/pid_integration/config_flow.py:60
Integration: PID Departure Boards (documentation, issues)
First occurred: 16:55:53 (7 occurrences)
Last logged: 17:23:23

Unknown API connection error
Traceback (most recent call last):
File "/config/custom_components/pid_integration/config_flow.py", line 60, in async_step_user
info = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pid_integration/config_flow.py", line 30, in validate_input
raise CannotConnect
custom_components.pid_integration.config_flow.CannotConnect

Druhý log s nenalezenou zastávkou:

Tato chyba pochází z vlastní integrace.

Logger: custom_components.pid_integration.config_flow
Source: custom_components/pid_integration/config_flow.py:60
Integration: pid_integration (documentation, issues)
First occurred: 16:54:32 (1 occurrences)
Last logged: 16:54:32

Stop with provided awsIDs was not found.
Traceback (most recent call last):
File "/config/custom_components/pid_integration/config_flow.py", line 60, in async_step_user
info = await validate_input(self.hass, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/pid_integration/config_flow.py", line 28, in validate_input
raise StopNotFound
custom_components.pid_integration.config_flow.StopNotFound

PID

Díky za kontrolu a sdělení, co jsem zase udělal špatně:)
R

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.