Dear Mr X,

Regarding the attitude of Buddha to gods and deities, from
http://sasanarakkha.org/articles/archive/2003_06_01_articles.html :

"Offerings to Devas as well

In Pattakamma Sutta (AN 4.61) the Buddha said to Anathapindika that a
noble disciple who acquired his income through righteous means should
spend it by making five types of offerings. These are offerings to
o living relatives
o guests
o departed relatives
o the king (government)
o devas.

There is also a verse in Ratana Sutta (Khp 6) that urges deities to
protect humans because they make offerings to them day and night.
So, whether or not one’s offerings are
appreciated or used by the recipient
does not affect the validity of the
wholesome kamma of doing puja.

The above references bring us to the following conclusion: a Buddhist is
actually encouraged by the Buddha to make offerings to departed
relatives as well as to devas.

Dedication of Offerings to Devas

In the story on the making of Pataliputta village found in
Mahaparinibbana Sutta (DN. 16), the Buddha advised people to offer dana
to virtuous monks and dedicate the offering to the devas there. We do
the same when we are invited for dana in a new house. These devas, being
honoured and cherished, will honour and cherish the occupants of the
house in return."

Best regards, Dmytro